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) <noreply@anthropic.com>
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user