Gradle Test Run :respect-datalayer-repository:jvmTest[jvm]

givenStatementCreatedOnClient_whenConnected_thenWillBeStoredOnServer[jvm]

summary

1

tests

0

failures

0

skipped

1.476s

duration

100%

successful

standard output

2026-08-19 12:05:30.996 [Test worker @coroutine#260] INFO  io.ktor.server.Application - Autoreload is disabled because the development mode is off.
2026-08-19 12:05:30.998 [Test worker @coroutine#260] INFO  io.ktor.server.Application - Application started in 0.092 seconds.
2026-08-19 12:05:30.999 [DefaultDispatcher-worker-5 @coroutine#269] INFO  io.ktor.server.Application - Responding at http://0.0.0.0:39249
2026-08-19 12:05:31.139 [DefaultDispatcher-worker-5 @coroutine#267] TRACE i.k.c.p.c.ContentNegotiation - Adding Accept=application/json header for http://localhost:39249/api/school/xapi/statements
2026-08-19 12:05:31.141 [DefaultDispatcher-worker-5 @coroutine#267] TRACE i.k.c.p.c.ContentNegotiation - Converted request body using io.ktor.serialization.kotlinx.KotlinxSerializationConverter@57aeec1f for http://localhost:39249/api/school/xapi/statements
2026-08-19 12:05:31.141 [DefaultDispatcher-worker-5 @coroutine#267] TRACE i.k.c.plugins.defaultTransformers - Transformed with default transformers request body for http://localhost:39249/api/school/xapi/statements from class io.ktor.http.content.TextContent
2026-08-19 12:05:31.143 [eventLoopGroupProxy-37-1 @call-handler#278] TRACE io.ktor.server.routing.Routing - Trace for [api, school, xapi, statements]
/, segment:0 -> SUCCESS @ /
  /api, segment:1 -> SUCCESS @ /api
    /api/school, segment:2 -> SUCCESS @ /api/school
      /api/school/xapi, segment:3 -> SUCCESS @ /api/school/xapi
        /api/school/xapi/statements, segment:4 -> SUCCESS @ /api/school/xapi/statements
          /api/school/xapi/statements [(method:GET)], segment:4 -> FAILURE "Selector didn't match" @ /api/school/xapi/statements [(method:GET)]
          /api/school/xapi/statements [(method:POST)], segment:4 -> SUCCESS @ /api/school/xapi/statements [(method:POST)]
Matched routes:
  "" -> "api" -> "school" -> "xapi" -> "statements" -> "(method:POST)"
Routing resolve result:
  SUCCESS @ /api/school/xapi/statements [(method:POST)]
2026-08-19 12:05:31.144 [eventLoopGroupProxy-37-1 @call-handler#278] TRACE i.k.server.engine.DefaultTransform - No Default Transformations found for class io.ktor.utils.io.ByteChannel and expected type TypeInfo(kotlinx.serialization.json.JsonElement) for call /api/school/xapi/statements
2026-08-19 12:05:31.155 [DefaultDispatcher-worker-2 @coroutine#267] TRACE i.k.client.plugins.HttpCallValidator - Processing exception java.io.IOException: unexpected end of stream on http://localhost:39249/... for request http://localhost:39249/api/school/xapi/statements

error output

Exception in thread "DefaultDispatcher-worker-2 @coroutine#267" java.io.IOException: unexpected end of stream on http://localhost:39249/...
	at _COROUTINE._BOUNDARY._(CoroutineDebugging.kt:42)
	at io.ktor.client.engine.okhttp.OkHttpEngine.executeHttpRequest(OkHttpEngine.kt:107)
	at io.ktor.client.engine.okhttp.OkHttpEngine.execute(OkHttpEngine.kt:71)
	at io.ktor.client.engine.HttpClientEngine$executeWithinCallContext$2.invokeSuspend(HttpClientEngine.kt:183)
	at io.ktor.client.engine.HttpClientEngine.executeWithinCallContext(HttpClientEngine.kt:184)
	at io.ktor.client.engine.HttpClientEngine$install$1.invokeSuspend(HttpClientEngine.kt:154)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.plugins.HttpSend$DefaultSender.execute(HttpSend.kt:141)
	at io.ktor.client.plugins.HttpRedirectKt$HttpRedirect$2$1.invokeSuspend(HttpRedirect.kt:110)
	at io.ktor.client.plugins.api.Send$install$1.invokeSuspend(CommonHooks.kt:52)
	at io.ktor.client.plugins.HttpCallValidatorKt$HttpCallValidator$2$2.invokeSuspend(HttpCallValidator.kt:143)
	at io.ktor.client.plugins.api.Send$install$1.invokeSuspend(CommonHooks.kt:52)
	at io.ktor.client.plugins.HttpSend$Plugin$install$1.invokeSuspend(HttpSend.kt:107)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.plugins.DefaultTransformKt$defaultTransformers$1.invokeSuspend(DefaultTransform.kt:64)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.plugins.api.TransformRequestBodyHook$install$1.invokeSuspend(KtorCallContexts.kt:88)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.plugins.RequestError$install$1.invokeSuspend(HttpCallValidator.kt:165)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.plugins.HttpRequestLifecycleKt$HttpRequestLifecycle$1$1.invokeSuspend(HttpRequestLifecycle.kt:29)
	at io.ktor.client.plugins.SetupRequestContext$install$1.invokeSuspend(HttpRequestLifecycle.kt:42)
	at io.ktor.util.pipeline.DebugPipelineContext.proceedLoop(DebugPipelineContext.kt:79)
	at io.ktor.client.HttpClient.execute$ktor_client_core(HttpClient.kt:1420)
	at io.ktor.client.statement.HttpStatement.fetchResponse(HttpStatement.kt:207)
	at world.respect.datalayer.http.school.xapi.XapiStatementsResourceHttp.post(XapiStatementsResourceHttp.kt:129)
	at world.respect.datalayer.repository.school.writequeue.DrainRemoteWriteQueueUseCase.invoke(DrainRemoteWriteQueueUseCase.kt:90)
	at world.respect.lib.test.clientservertest.ClientServerDataSourceTestBuilder$clients$1$2.invokeSuspend(ClientServerDatasourceTest.kt:280)
	Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [CoroutineId(267), "coroutine#267":StandaloneCoroutine{Cancelling}@6405e541, Dispatchers.Default]
Caused by: java.io.IOException: unexpected end of stream on http://localhost:39249/...
	at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:252)
	at okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.kt:116)
	at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.kt:97)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:332)
	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.kt:34)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:332)
	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.kt:98)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:332)
	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.kt:83)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:332)
	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.kt:72)
	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.kt:332)
	at okhttp3.internal.connection.RealCall.getResponseWithInterceptorChain$okhttp(RealCall.kt:232)
	at okhttp3.internal.connection.RealCall$AsyncCall.run(RealCall.kt:580)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.io.EOFException: \n not found: limit=0 content=…
	at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.kt:362)
	at okhttp3.internal.http1.HeadersReader.readLine(HeadersReader.kt:32)
	at okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.kt:215)
	... 16 more