Skip to content

A tiny friend in your Mac's notch and on your iPhone that keeps an eye on your AI coding agents: Claude Code, Codex, Cursor, Gemini CLI, Antigravity and more. Approve from the notch or your Lock Screen.

RelayNodeTwinTest: wait up to 20 s for the relay, as busy CI runners are slow

Rhytam Biswas121bb48ecb39
diff --git a/android/app/src/test/kotlin/com/coucou/android/link/RelayNodeTwinTest.kt b/android/app/src/test/kotlin/com/coucou/android/link/RelayNodeTwinTest.kt
index 2084f51d..2d4e956f 100644
--- a/android/app/src/test/kotlin/com/coucou/android/link/RelayNodeTwinTest.kt
+++ b/android/app/src/test/kotlin/com/coucou/android/link/RelayNodeTwinTest.kt
@@ -91,7 +91,7 @@ class RelayNodeTwinTest {
}
private fun awaitSession(h: Host) {
- val end = System.currentTimeMillis() + 5_000
+ val end = System.currentTimeMillis() + 20_000
while (h.session == null && System.currentTimeMillis() < end) Thread.sleep(10)
}
@@ -100,13 +100,13 @@ class RelayNodeTwinTest {
val phone = RelayConnector(pairing()).connect(3_000)
try {
phone.getOutputStream().write("{\"type\":\"hello\"}\n".toByteArray())
- assertEquals("{\"type\":\"hello\"}", host.lines.poll(5, TimeUnit.SECONDS))
+ assertEquals("{\"type\":\"hello\"}", host.lines.poll(20, TimeUnit.SECONDS))
host.send("{\"type\":\"welcome\"}")
assertEquals("{\"type\":\"welcome\"}", readLine(phone))
// A larger line, several frames in a row, and both directions interleaved.
val big = "{\"x\":\"" + "a".repeat(40_000) + "\"}"
repeat(5) { phone.getOutputStream().write((big + "\n").toByteArray()) }
- repeat(5) { assertEquals(big, host.lines.poll(5, TimeUnit.SECONDS)) }
+ repeat(5) { assertEquals(big, host.lines.poll(20, TimeUnit.SECONDS)) }
repeat(5) { host.send(big) }
repeat(5) { assertEquals(big, readLine(phone)) }
} finally {