From 4606a29d5e573c8b7d90a81286fbb8e2f6ca69b3 Mon Sep 17 00:00:00 2001 From: Pauljd Date: Sat, 7 Nov 2026 09:03:02 +0000 Subject: [PATCH] Rooms test: give the link's close a moment in the full suite (it failed now and then) Co-Authored-By: Claude Opus 5.5 (1M context) --- android/app/src/test/java/tv/orbit/classic/RoomsTest.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/app/src/test/java/tv/orbit/classic/RoomsTest.kt b/android/app/src/test/java/tv/orbit/classic/RoomsTest.kt index a1a1d716..2bc1ca84 100644 --- a/android/app/src/test/java/tv/orbit/classic/RoomsTest.kt +++ b/android/app/src/test/java/tv/orbit/classic/RoomsTest.kt @@ -77,7 +77,8 @@ class RoomsTest { assertEquals(1, join.collect().getOrThrow()!!.getInt("version")) PhoneLink.offerRoom(null) // With no offer and no phones, the server stops altogether. - assertTrue(runCatching { call("POST", "/room/hello", "{}") }.isFailure) + // The close can take a moment to land when the full suite runs (it failed now and then): give it up to a second. + assertTrue((1..20).any { runCatching { call("POST", "/room/hello", "{}") }.isFailure.also { stopped -> if (!stopped) Thread.sleep(50) } }) } finally { PhoneLink.stop(); PhoneLink.allowed = EmbyServer::isHomeAddress; PhoneLink.bindTo = null; PhoneLink.port = PhoneLink.PORT } }