wgengine/magicsock: deflake TestReceiveFromAllocs

100 iterations isn't enough with background allocs happening
apparently. 1000 seems to be reliable.

Fixes #2826

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
pull/2828/head
Brad Fitzpatrick 3 years ago
parent a353fbd3b4
commit 31c1331415

@ -1270,7 +1270,7 @@ func TestReceiveFromAllocs(t *testing.T) {
}
t.Logf("allowing %d allocs for Go version %q", maxAllocs, runtime.Version())
roundTrip := setUpReceiveFrom(t)
avg := int(testing.AllocsPerRun(100, roundTrip))
avg := int(testing.AllocsPerRun(1000, roundTrip))
if avg > maxAllocs {
t.Fatalf("expected %d allocs in ReceiveFrom, got %v", maxAllocs, avg)
}

Loading…
Cancel
Save