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 runs on a fake clock, so a stall on the host cannot use up its idle timeout. 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
e58c6635e7
commit
4a9b39c7b7
8 files changed
+105
-41
No files matched your search
@@ -301,9 +301,13 @@ func TestRestartLoadsCopiesFromDisk(t *testing.T) {
|
||||
second.Start(t.Context())
|
||||
second.Stop(t.Context())
|
||||
|
||||
// The download takes its time after writing the file, and the restart
|
||||
// reads the file's time. A busy host can put seconds between the two.
|
||||
const maxUpdatedDifference = 15 * time.Second
|
||||
|
||||
listings := lookup(t, second, listedAddr)
|
||||
if len(listings) != 1 ||
|
||||
listings[0].Updated.Sub(downloaded).Abs() > time.Second {
|
||||
listings[0].Updated.Sub(downloaded).Abs() > maxUpdatedDifference {
|
||||
t.Errorf("after the restart, listings %+v, want one updated at %s",
|
||||
listings, downloaded)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user