diff --git a/internal/davsync/stall_test.go b/internal/davsync/stall_test.go index c2713c10..e9b26863 100644 --- a/internal/davsync/stall_test.go +++ b/internal/davsync/stall_test.go @@ -152,7 +152,11 @@ func narrow(c net.Conn, buffer int) error { // down, but never stops moving, is written and read in full (#657: 43 MB // at 305 KB/s took 2.4 minutes, and a sync was given 2). func TestSlowTransferIsNotCutShort(t *testing.T) { - shortStall(t, 300*time.Millisecond, 300*time.Millisecond) + // a second, not the 300 ms the other stall tests use: a macOS runner + // can stop the whole test for a few hundred ms, and here the line never + // stops, so such a pause is all a shorter watchdog would catch (red + // on macOS in run 37693090857, near the end of the GET) + shortStall(t, time.Second, time.Second) // the PUT's last MBs cross the line twice the watchdog after magpie has // handed them all over s := &slowDAV{chunk: 256 << 10, gap: 40 * time.Millisecond, tail: 2 * stallAfter} @@ -162,8 +166,8 @@ func TestSlowTransferIsNotCutShort(t *testing.T) { t.Fatal(err) } d.client = client - // ~20 MB at 6.4 MB/s: 3 s each way - data := bytes.Repeat([]byte("magpie skill "), (20<<20)/13) + // ~24 MB at 6.4 MB/s: nearly 4 s each way + data := bytes.Repeat([]byte("magpie skill "), (24<<20)/13) ctx := context.Background() start := time.Now() if _, err := d.put(ctx, data, ""); err != nil { @@ -179,7 +183,7 @@ func TestSlowTransferIsNotCutShort(t *testing.T) { if !bytes.Equal(got, data) { t.Fatalf("read back %d bytes of %d", len(got), len(data)) } - if up < 5*stallAfter || down < 5*stallAfter { + if up < 3*stallAfter || down < 3*stallAfter { t.Fatalf("the transfers (%s up, %s down) weren't slow enough to test anything", up, down) } }