Make the routewatch tests pass on a loaded host (closes #213)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Five prefix handler tests gave HandleMessage two seconds to apply a full batch of 25,000 prefixes, which under the race detector on a loaded host takes longer. A test now waits up to stepTimeout, 15 seconds, for each step it expects. The slowest tests filled production limits, such as the peering handler's 500,000 paths. The peering handler now takes its path limit, and the prefix handler its limit on one write of the table's changes, as they take their timer interval. Those tests give small limits, and the tests of the maximum batch size lower it to one batch. This also fixes #215. The test helpers bound every wait, Stop included, so a test that hangs in one fails with its own message. Model: opus-5-5
This commit was merged in pull request #214.
This commit is contained in:
1 parent
5ea1bb17fe
commit
38b43549b9
14 files changed
+234
-143
No files matched your search
@@ -97,7 +97,7 @@ func TestDBMaintainerStopReturnsByItsDeadline(t *testing.T) {
|
||||
|
||||
select {
|
||||
case <-store.started:
|
||||
case <-time.After(handleMessageTimeout):
|
||||
case <-time.After(stepTimeout):
|
||||
t.Fatal("the maintainer did not start the checkpoint")
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ func TestDBMaintainerStopReturnsByItsDeadline(t *testing.T) {
|
||||
|
||||
select {
|
||||
case <-m.done:
|
||||
case <-time.After(handleMessageTimeout):
|
||||
case <-time.After(stepTimeout):
|
||||
t.Fatal("the maintenance goroutine did not return after the " +
|
||||
"checkpoint ended")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user