Root cause
The test assumes strict alternating message ordering between server-side writes and client-side reads via a Channel. This ordering is not guaranteed because the server coroutine and client coroutine may be scheduled differently on different platforms.
Error on mingwX64:
kotlin.AssertionError: Expected <Test 1>, actual <[Client] Test 1>.
Also seen on JVM on the release/3.x base branch (build 412674).
Suggested fix
The test design relies on timing-dependent interleaving. Consider using explicit synchronization (e.g., a second channel or barrier) to enforce the expected ordering, or restructure the test to not depend on strict interleaving.
File: ktor-server/ktor-server-test-host/common/test/TestApplicationTest.kt
Observed in PR #5465 and on release/3.x base branch.
Root cause
The test assumes strict alternating message ordering between server-side writes and client-side reads via a Channel. This ordering is not guaranteed because the server coroutine and client coroutine may be scheduled differently on different platforms.
Error on mingwX64:
Also seen on JVM on the
release/3.xbase branch (build 412674).Suggested fix
The test design relies on timing-dependent interleaving. Consider using explicit synchronization (e.g., a second channel or barrier) to enforce the expected ordering, or restructure the test to not depend on strict interleaving.
File:
ktor-server/ktor-server-test-host/common/test/TestApplicationTest.ktObserved in PR #5465 and on
release/3.xbase branch.