From 53b5b822bea2578daa1e9b802862089f15ce5891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Claus=20R=C3=B8rbech?= Date: Thu, 8 Aug 2024 11:53:28 +0200 Subject: [PATCH] Enable tracing for platform network tests --- .../io/realm/kotlin/mongodb/internal/OkHttpWebsocketClient.kt | 1 + .../io/realm/kotlin/test/mongodb/jvm/PlatformNetworkingTests.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/library-sync/src/jvm/kotlin/io/realm/kotlin/mongodb/internal/OkHttpWebsocketClient.kt b/packages/library-sync/src/jvm/kotlin/io/realm/kotlin/mongodb/internal/OkHttpWebsocketClient.kt index 0d0b52a402..b6e49173fc 100644 --- a/packages/library-sync/src/jvm/kotlin/io/realm/kotlin/mongodb/internal/OkHttpWebsocketClient.kt +++ b/packages/library-sync/src/jvm/kotlin/io/realm/kotlin/mongodb/internal/OkHttpWebsocketClient.kt @@ -75,6 +75,7 @@ public class OkHttpWebsocketClient( scope.launch { okHttpClient.newWebSocket(request, this@OkHttpWebsocketClient) } + logger.debug("init") } override fun onOpen(webSocket: WebSocket, response: Response) { diff --git a/packages/test-sync/src/jvmTest/kotlin/io/realm/kotlin/test/mongodb/jvm/PlatformNetworkingTests.kt b/packages/test-sync/src/jvmTest/kotlin/io/realm/kotlin/test/mongodb/jvm/PlatformNetworkingTests.kt index bc4994a985..6dc295a0ad 100644 --- a/packages/test-sync/src/jvmTest/kotlin/io/realm/kotlin/test/mongodb/jvm/PlatformNetworkingTests.kt +++ b/packages/test-sync/src/jvmTest/kotlin/io/realm/kotlin/test/mongodb/jvm/PlatformNetworkingTests.kt @@ -39,7 +39,7 @@ class PlatformNetworkingTests { // Setup logger to capture WebSocketClient log messages val logger = CustomLogCollector() RealmLog.add(logger) - RealmLog.setLevel(LogLevel.DEBUG, LogCategory.Realm.Sdk) + RealmLog.setLevel(LogLevel.ALL, LogCategory.Realm.Sdk) Realm.open(createSyncConfig(app.createUserAndLogIn(), selector)).use { uploadRealm -> Realm.open(createSyncConfig(app.createUserAndLogIn(), selector)).use { realm ->