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

@@ -153,14 +153,10 @@ func TestUnsetRouteWatchChangesNothing(t *testing.T) {
func TestUnreachableRouteWatchLetsTheRequestThroughAndSaysWhy(t *testing.T) {
t.Parallel()
// A stand-in that is closed at once, so that the port refuses connections.
dead := httptest.NewServer(http.NotFoundHandler())
url := dead.URL
dead.Close()
// Another test can take a closed server's port at once, so routewatch's
// address here is a multicast address, to which TCP cannot connect.
s, _, _ := startWithClock(t, "", map[string]string{
lookupSource: off, routeWatchURL: url,
lookupSource: off, routeWatchURL: "http://224.0.0.1",
})
wantTagsMissing(t, s.get(fromDE, http.StatusOK, requestlog.ActionForward),