Tests no longer connect to test servers they closed (closes #257)
check / check (push) Failing after 2m5s

Four tests closed a test server or stopped discriminator, and then
connected to its port. Another test process could take that port in
between and receive the connection.

- TestUnreachableRouteWatchLetsTheRequestThroughAndSaysWhy and
  TestUnreachableRoutewatchFailsTheQueryAndTheLogOmitsTheClient, formerly
  TestRefusedConnection..., point routewatch at 224.0.0.1, a multicast
  address to which TCP cannot connect.
- TestStalledRemoteLogEndpointHoldsUpNoRequest keeps its endpoint open
  and closes each connection it takes, instead of closing the endpoint.
- TestTheSiteAnswersWhileDiscriminatorIsStoppedAndStartedAgain gives
  rproxy an address the test holds throughout. The test forwards each
  connection there to the running discriminator, and closes it while
  discriminator is stopped.

No change to non-test code.

Model: opus-5-5
This commit was merged in pull request #260.
This commit is contained in:
clawbot committed 2026-11-10 00:58:01 +01:00
1 parent c86df7610d
commit 9e7a7e60c7
4 files changed
+120 -19

No files matched your search

+14 -3
View File
@@ -975,9 +975,20 @@ func TestStalledRemoteLogEndpointHoldsUpNoRequest(t *testing.T) {
t.Errorf("no line dropped in the metrics:\n%s", metrics)
}
// Closed, the endpoint refuses the connection made to send the
// lines still waiting at the stop, which then does not wait.
_ = endpoint.Close()
// From here the endpoint closes each connection it takes, so the
// one made to send the lines still waiting at the stop fails at
// once. Closing the endpoint instead would free its port for
// another test to take.
go func() {
for {
conn, err := endpoint.Accept()
if err != nil {
return
}
_ = conn.Close()
}
}()
})
out.line(t, "type", "request")