]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: increase timeout in tests
authorJosh Bleecher Snyder <josh@tailscale.com>
Mon, 14 Dec 2020 22:11:33 +0000 (14:11 -0800)
committerJason A. Donenfeld <Jason@zx2c4.com>
Thu, 7 Jan 2021 13:49:44 +0000 (14:49 +0100)
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>
device/device_test.go

index cc84821fd6a519f17e753fd51969229478088427..a91e6ca2aac8a6aaeda163bd96f5f42b6a652dde 100644 (file)
@@ -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")
                }
        })