realm / realm-kotlin

Kotlin Multiplatform and Android SDK for the Realm Mobile Database: Build Better Apps Faster.
Apache License 2.0
932 stars 57 forks source link

Flaky test: io.realm.kotlin.test.mongodb.jvm.PlatformNetworkingTests.syncRoundTrip_coreNetworking #1819

Open rorbech opened 1 month ago

rorbech commented 1 month ago

There seem to be something related to platform networking that isn't torn properly down. When running tests on CI the Sync JVM Linux tests sometimes fails to pass on the Flaky test: io.realm.kotlin.test.mongodb.jvm.PlatformNetworkingTests.syncRoundTrip_coreNetworking due to some callbacks to the a websocket-transport client.

2024-08-13T08:49:51.1361363Z     2024-Aug-13 08:49:51,116 DEBUG: [REALM] [SDK] [Websocket-210459023] init
2024-08-13T08:49:51.3303847Z     2024-Aug-13 08:49:51,241 DEBUG: [REALM] [SDK] [Websocket-210459023] onOpen websocket http://100.27.1.167:36319/api/client/v2.0/app/test-app-flx-ugksndu/realm-sync?baas_at=***
2024-08-13T08:49:51.3305415Z     2024-Aug-13 08:49:51,241 DEBUG: [REALM] [SDK] [Websocket-210459023] onClosing code = 1011 reason = error isClosed = false observerIsClosed = false

Assuming that this is something that it unexpectedly cached somewhere in app context in the sync client as we should be closing and terminating sync from the SDK side.

Seen in https://github.com/realm/realm-kotlin/actions/runs/10365026696/job/28695503175

sync-by-unito[bot] commented 1 month ago

➤ PM Bot commented:

Jira ticket: RKOTLIN-1119