diff --git a/yorkie/src/androidTest/kotlin/dev/yorkie/core/ClientTest.kt b/yorkie/src/androidTest/kotlin/dev/yorkie/core/ClientTest.kt index 6e9b2b388..e5628c051 100644 --- a/yorkie/src/androidTest/kotlin/dev/yorkie/core/ClientTest.kt +++ b/yorkie/src/androidTest/kotlin/dev/yorkie/core/ClientTest.kt @@ -565,6 +565,10 @@ class ClientTest { assertIs(d2Events.first()) assertTreesXmlEquals("

12

34

", d1, d2) + // In push-only mode, remote-change events should not occur. + d2Events.clear() + c2.pauseRemoteChanges(d2) + d1.updateAsync { root, _ -> root.rootTree().edit(2, 2, text { "a" }) }.await() @@ -574,14 +578,12 @@ class ClientTest { // but a response has not yet been received. c2.syncAsync().await() - // In push-only mode, remote-change events should not occur. - d2Events.clear() - c2.pauseRemoteChanges(d2) - delay(100) // Keep the push-only state. assertTrue(d2Events.none { it is RemoteChange }) c2.resumeRemoteChanges(d2) + delay(100) + assertTrue { d2Events.any { it is RemoteChange } } d2.updateAsync { root, _ -> root.rootTree().edit(2, 2, text { "b" })