Wait up to 30 seconds for each step the routewatch tests expect (closes #213)
check / check (push) Canceled after 0s

Five prefix handler tests gave HandleMessage two seconds to apply a full
batch of 25,000 prefixes. Under the race detector on a loaded host that
takes longer, so they failed although nothing waited. Among them were
TestPrefixHandlerSkipsItsLastWriteAfterTheStopDeadline,
TestPrefixHandlerSkipsAFullBatchAfterTheStopDeadline and
TestPrefixHandlerHandlesMessagesWhileAWriteIsBlocked.

handleMessageTimeout is now 30 seconds, and every bound a test in the
package puts on a step it expects uses it. Only a step that never comes
reaches it. A test that hangs still fails with its own message before go
test's 90-second timeout.

Model: opus-5-5
This commit is contained in:
2026-10-27 22:22:01 +00:00
parent 5ea1bb17fe
commit 44c2ce9261
4 changed files with 24 additions and 29 deletions
@@ -32,10 +32,6 @@ const (
firstManyPrefix = "10.0.0.0/32"
)
// tableWriteTimeout is how long a test waits for the flush timer to write the
// routing table's changes: a few ticks of it.
const tableWriteTimeout = 5 * prefixBatchTimeout
// tableCase is one test of the routing table in memory: the messages handed to
// the prefix handler, and for each prefix the peers that carry it with each
// origin AS after them.
@@ -276,9 +272,9 @@ func TestPrefixHandlerWritesTheTableChangesEachSecond(t *testing.T) {
t.Fatalf("wrote %+v, want the pair of %s and AS%d with "+
"removed %t", changes, prefix, testASNB, step.wantRemoved)
}
case <-time.After(tableWriteTimeout):
case <-time.After(handleMessageTimeout):
t.Fatalf("the routing table's change was not written within %s",
tableWriteTimeout)
handleMessageTimeout)
}
}
}