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 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0172Hejd12i4aYikYW9vgpZs
This commit is contained in:
Claude committed 2026-10-17 09:10:56 +00:00
1 parent 32bddae3f5
commit b5d7fca041
1 file changed
+3
@@ -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