<?xml version="1.0" encoding="UTF-8"?>
<testsuite name="XapiStatementRepositoryIntegrationTest[jvm]" tests="2" skipped="0" failures="0" errors="0" timestamp="2026-09-16T17:09:40.518Z" hostname="devserver3.ustadmobile.com" time="2.48">
  <properties/>
  <testcase name="givenStatementCreatedOnClient_whenConnected_thenWillBeStoredOnServer[jvm]" classname="world.respect.datalayer.repository.school.xapi.XapiStatementRepositoryIntegrationTest" time="1.316"/>
  <testcase name="givenStatementOnServer_whenGetOnRepoCalled_thenWillBeFetched[jvm]" classname="world.respect.datalayer.repository.school.xapi.XapiStatementRepositoryIntegrationTest" time="1.164"/>
  <system-out><![CDATA[2026-09-16 21:09:40.627 [Test worker @coroutine#260] INFO  io.ktor.server.Application - Autoreload is disabled because the development mode is off.
2026-09-16 21:09:40.629 [Test worker @coroutine#260] INFO  io.ktor.server.Application - Application started in 0.05 seconds.
2026-09-16 21:09:40.630 [DefaultDispatcher-worker-4 @coroutine#269] INFO  io.ktor.server.Application - Responding at http://0.0.0.0:41623
2026-09-16 21:09:40.717 [DefaultDispatcher-worker-1 @coroutine#267] TRACE i.k.c.p.c.ContentNegotiation - Adding Accept=application/json header for http://localhost:41623/api/school/xapi/statements
2026-09-16 21:09:40.719 [DefaultDispatcher-worker-1 @coroutine#267] TRACE i.k.c.p.c.ContentNegotiation - Converted request body using io.ktor.serialization.kotlinx.KotlinxSerializationConverter@3414f116 for http://localhost:41623/api/school/xapi/statements
2026-09-16 21:09:40.719 [DefaultDispatcher-worker-1 @coroutine#267] TRACE i.k.c.plugins.defaultTransformers - Transformed with default transformers request body for http://localhost:41623/api/school/xapi/statements from class io.ktor.http.content.TextContent
2026-09-16 21:09:40.721 [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-09-16 21:09:40.722 [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-09-16 21:09:40.732 [DefaultDispatcher-worker-2 @coroutine#267] TRACE i.k.client.plugins.HttpCallValidator - Processing exception java.io.IOException: unexpected end of stream on http://localhost:41623/... for request http://localhost:41623/api/school/xapi/statements
2026-09-16 21:09:41.933 [Test worker @coroutine#282] INFO  io.ktor.server.Application - Autoreload is disabled because the development mode is off.
2026-09-16 21:09:41.934 [Test worker @coroutine#282] INFO  io.ktor.server.Application - Application started in 0.047 seconds.
2026-09-16 21:09:41.935 [DefaultDispatcher-worker-1 @coroutine#291] INFO  io.ktor.server.Application - Responding at http://0.0.0.0:46717
2026-09-16 21:09:41.982 [Test worker @coroutine#282] TRACE i.k.c.p.c.ContentNegotiation - Adding Accept=application/json header for http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false
2026-09-16 21:09:41.982 [Test worker @coroutine#282] TRACE i.k.c.p.c.ContentNegotiation - Body type class io.ktor.client.utils.EmptyContent is in ignored types. Skipping ContentNegotiation for http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false.
2026-09-16 21:09:41.984 [eventLoopGroupProxy-40-1 @call-handler#298] 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 -> SUCCESS @ /api/school/xapi/statements [(method:GET)]
          /api/school/xapi/statements [(method:POST)], segment:4 -> FAILURE "Selector didn't match" @ /api/school/xapi/statements [(method:POST)]
Matched routes:
  "" -> "api" -> "school" -> "xapi" -> "statements" -> "(method:GET)"
Routing resolve result:
  SUCCESS @ /api/school/xapi/statements [(method:GET)]
2026-09-16 21:09:41.988 [Test worker @coroutine#282] TRACE io.ktor.client.plugins.SaveBody - Saving body for http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false
2026-09-16 21:09:41.988 [Test worker @coroutine#282] TRACE i.k.client.plugins.HttpCallValidator - Validating response for request http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false
2026-09-16 21:09:41.988 [Test worker @coroutine#282] TRACE i.k.c.p.DefaultResponseValidation - Skipping default response validation for http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false
2026-09-16 21:09:41.989 [Test worker @coroutine#282] TRACE i.k.c.p.c.ContentNegotiation - Response body was converted to class world.respect.lib.xapi.model.XapiStatementResult for http://localhost:46717/api/school/xapi/statements?statementId=6690e6c9-3ef0-4ed3-8b37-7f3964730bee&related_activities=false&related_agents=false&format=exact&attachments=false&ascending=false.
]]></system-out>
  <system-err><![CDATA[Exception in thread "DefaultDispatcher-worker-2 @coroutine#267" java.io.IOException: unexpected end of stream on http://localhost:41623/...
	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}@72c40b88, Dispatchers.Default]
Caused by: java.io.IOException: unexpected end of stream on http://localhost:41623/...
	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
]]></system-err>
</testsuite>
