From b5d7fca0413d4d4067a879630b2eb32695d4cb73 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 17 Oct 2026 09:10:56 +0000 Subject: [PATCH] PppHostTest: wait for the host's side of the link to come up (it may follow the computer's) Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs --- app/src/test/java/com/neodesktop/dmodem/ppp/PppHostTest.kt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/test/java/com/neodesktop/dmodem/ppp/PppHostTest.kt b/app/src/test/java/com/neodesktop/dmodem/ppp/PppHostTest.kt index 1c79cfc..2637f3f 100644 --- a/app/src/test/java/com/neodesktop/dmodem/ppp/PppHostTest.kt +++ b/app/src/test/java/com/neodesktop/dmodem/ppp/PppHostTest.kt @@ -106,6 +106,9 @@ class PppHostTest { val cfg = c.startPpp() assertEquals("10.64.64.2", cfg.address.hostAddress) assertEquals(listOf("10.64.64.1"), cfg.dns.map { it.hostAddress }) + // (the host's side of the link up too: a moment after the computer's, perhaps) + val end = System.currentTimeMillis() + 3000 + while (!c.host.online.value && System.currentTimeMillis() < end) Thread.sleep(10) assertTrue(c.host.online.value) // the computer hangs up (DTR): NO CARRIER, and commands again c.pppOn = false