Skip to content

Commit

Permalink
Fix tests and samples
Browse files Browse the repository at this point in the history
  • Loading branch information
anti-social committed Jun 23, 2023
1 parent 063160d commit ad0539b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ abstract class ElasticsearchTestBase : TestBase() {
object : Tracker {
override fun requiresTextContent(request: Request<*, *, *>) = true

override fun onRequest(request: PlainRequest) {
override suspend fun onRequest(request: PlainRequest) {
if (!debug.value) {
return
}
Expand All @@ -47,7 +47,7 @@ abstract class ElasticsearchTestBase : TestBase() {
println()
}

override fun onResponse(responseResult: Result<PlainResponse>, duration: Duration) {
override suspend fun onResponse(responseResult: Result<PlainResponse>, duration: Duration) {
if (!debug.value) {
return
}
Expand Down
4 changes: 2 additions & 2 deletions samples/src/jvmMain/kotlin/samples/started/ClusterJvm.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ actual val esTransport = ElasticsearchKtorTransport(
object : Tracker {
override fun requiresTextContent(request: Request<*, *, *>) = true

override fun onRequest(request: PlainRequest) {
override suspend fun onRequest(request: PlainRequest) {
println(">>>")
println("${request.method} ${request.path.ifEmpty { "/" }}")
println(request.textContent)
}

override fun onResponse(responseResult: Result<PlainResponse>, duration: Duration) {
override suspend fun onResponse(responseResult: Result<PlainResponse>, duration: Duration) {
responseResult
.onSuccess { response ->
println("<<< ${response.statusCode}: ${duration}")
Expand Down

0 comments on commit ad0539b

Please sign in to comment.