aboutsummaryrefslogtreecommitdiffstats
path: root/device/device_test.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josh@tailscale.com>2020-12-14 14:11:33 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2021-01-07 14:49:44 +0100
commitdb1edc7e915635dfd31554f8f9a80d6e20740926 (patch)
treec83cc1ccaf6f44a3e9f0ef704eb12a8a869e4cfa /device/device_test.go
parentdevice: prevent spurious errors while closing a device (diff)
downloadwireguard-go-db1edc7e915635dfd31554f8f9a80d6e20740926.tar.xz
wireguard-go-db1edc7e915635dfd31554f8f9a80d6e20740926.zip
device: increase timeout in tests
When running many concurrent test processing using https://godoc.org/golang.org/x/tools/cmd/stress the processing sometimes cannot complete a ping in under 300ms. Increase the timeout to 5s to reduce the rate of false positives. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
Diffstat (limited to 'device/device_test.go')
-rw-r--r--device/device_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/device/device_test.go b/device/device_test.go
index cc84821..a91e6ca 100644
--- a/device/device_test.go
+++ b/device/device_test.go
@@ -112,7 +112,7 @@ func TestTwoDevicePing(t *testing.T) {
if !bytes.Equal(msg2to1, msgRecv) {
t.Error("ping did not transit correctly")
}
- case <-time.After(300 * time.Millisecond):
+ case <-time.After(5 * time.Second):
t.Error("ping did not transit")
}
})
@@ -125,7 +125,7 @@ func TestTwoDevicePing(t *testing.T) {
if !bytes.Equal(msg1to2, msgRecv) {
t.Error("return ping did not transit correctly")
}
- case <-time.After(300 * time.Millisecond):
+ case <-time.After(5 * time.Second):
t.Error("return ping did not transit")
}
})