mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
syncs: disable TestWatchMultipleValues on Windows CI builds
The Windows CI machine experiences significant random execution delays. For example, in this code from watchdog.go: done := make(chan bool) go func() { start := time.Now() mu.Lock() There was a 500ms delay from initializing done to locking mu. This test checks that we receive a sufficient number of events quickly enough. In the face of random 500ms delays, unsurprisingly, the test fails. There's not much principled we can do about it. We could build a system of retries or attempt to detect these random delays, but that game isn't worth the candle. Skip the test. Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
parent
4954fbfda6
commit
0807e3e2f7
@ -6,9 +6,12 @@ package syncs
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"runtime"
|
||||||
"sync"
|
"sync"
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"tailscale.com/util/cibuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Time-based tests are fundamentally flaky.
|
// Time-based tests are fundamentally flaky.
|
||||||
@ -46,6 +49,12 @@ func TestWatchContended(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestWatchMultipleValues(t *testing.T) {
|
func TestWatchMultipleValues(t *testing.T) {
|
||||||
|
if cibuild.On() && runtime.GOOS == "windows" {
|
||||||
|
// On the CI machine, it sometimes takes 500ms to start a new goroutine.
|
||||||
|
// When this happens, we don't get enough events quickly enough.
|
||||||
|
// Nothing's wrong, and it's not worth working around. Just skip the test.
|
||||||
|
t.Skip("flaky on Windows CI")
|
||||||
|
}
|
||||||
mu := new(sync.Mutex)
|
mu := new(sync.Mutex)
|
||||||
ctx, cancel := context.WithCancel(context.Background())
|
ctx, cancel := context.WithCancel(context.Background())
|
||||||
defer cancel() // not necessary, but keep vet happy
|
defer cancel() // not necessary, but keep vet happy
|
||||||
|
Loading…
x
Reference in New Issue
Block a user