e2e: the harness waits for SSH but not HTTP, so a test's first request can be refused #91

closed cmc opened this on 2026-09-03 00:54 UTC · bug ci · assigned to cmc

Discussion

cmc 2026-09-03 00:54 UTC

startInstanceWith in e2e/ssh_test.go returns once the SSH port answers. The HTTP listener comes up in its own goroutine, so a test whose first action is an HTTP request can hit it before it binds:

  • build 331 (stack-7-sessions): TestWebSignup, Get "http://127.0.0.1:42859/": connect: connection refused, 1.0s into the test
  • build 358 (stack-9-help): TestHealthz, Get ".../healthz": connect: connection refused, 0.99s into the test

Both commits passed in the layer above them minutes later. Each false red cost a re-run or a judgement call at merge time.

Fix: wait for httpPort the same way the harness waits for the SSH port (and gitPort when the git daemon is on), so an instance is ready on every listener before the test starts.

closed by commit 8eea89a307 by cmc: e2e: an instance is ready on every listener before a test starts

2026-09-03 01:18 UTC