Tests that waited a few seconds for something to happen now wait 15 seconds. The wait ends as soon as the condition holds, so a passing run takes no longer. TestStreamNotDroppedWhileLinesArrive, and the tests whose requests pass a 2- or 4-second limit in the server, run on a fake clock, so a stall on the host cannot use up the limit. The checkpoint tests give the writing connection a 30-second busy timeout, so their limit can be 15 seconds and a checkpoint that waits for a read still fails them. Model: opus-5-5
This commit is contained in:
1 parent
cf50d195ad
commit
cf30c7460c
10 files changed
+249
-121
No files matched your search
@@ -76,7 +76,9 @@ func asLink(asn int) string {
|
||||
}
|
||||
|
||||
// TestHomePageCardsShowTheTableFigures fills a routing table and the asns
|
||||
// table, works out the cards, and checks that each card shows its figure.
|
||||
// table, works out the cards, and checks that each card shows its figure. The
|
||||
// cards are worked out in a synctest bubble, whose clock is fake, so a stall on
|
||||
// the host does not use up the 4-second limit on their database read.
|
||||
func TestHomePageCardsShowTheTableFigures(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
@@ -95,7 +97,9 @@ func TestHomePageCardsShowTheTableFigures(t *testing.T) {
|
||||
t.Fatalf("GetOrCreateASNBatch: %v", err)
|
||||
}
|
||||
|
||||
s.refreshHomeCards(t.Context())
|
||||
synctest.Test(t, func(t *testing.T) {
|
||||
s.refreshHomeCards(t.Context())
|
||||
})
|
||||
|
||||
page := get(t, s, "/").Body.String()
|
||||
|
||||
@@ -279,7 +283,7 @@ func TestKeepHomeCardsFreshWorksThemOutEveryInterval(t *testing.T) {
|
||||
|
||||
const (
|
||||
interval = 10 * time.Millisecond
|
||||
maxWait = 5 * time.Second
|
||||
maxWait = 15 * time.Second
|
||||
)
|
||||
|
||||
table := emptyTable()
|
||||
@@ -321,7 +325,7 @@ func TestKeepHomeCardsFreshWorksThemOutEveryInterval(t *testing.T) {
|
||||
func TestStartedServerWorksOutTheCards(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
const maxWait = 5 * time.Second
|
||||
const maxWait = 15 * time.Second
|
||||
|
||||
s := newServerWithTable(t, newCardsTable())
|
||||
|
||||
|
||||
Reference in new issue
Block a user