diff --git a/desktopApp/src/jvmTest/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopBlossomServerListTest.kt b/desktopApp/src/jvmTest/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopBlossomServerListTest.kt index 6cdb574b23..ce7cfe48c7 100644 --- a/desktopApp/src/jvmTest/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopBlossomServerListTest.kt +++ b/desktopApp/src/jvmTest/kotlin/com/vitorpamplona/amethyst/desktop/cache/DesktopBlossomServerListTest.kt @@ -93,7 +93,10 @@ class DesktopBlossomServerListTest { scope = backgroundScope, ) - assertEquals(servers, state.getBlossomServersList()?.servers()) + // Await the IO-backed stateIn subscription first: the flow settling proves the + // state finished wiring, after which the synchronous getter must agree. Asserting + // the getter before the flow raced the Dispatchers.IO hop on fast CI runners. assertEquals(servers, state.flow.first { it.isNotEmpty() }) + assertEquals(servers, state.getBlossomServersList()?.servers()) } }