diff options
| author | James 'zofrex' Sanderson <jsanderson@tailscale.com> | 2026-04-22 10:22:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-22 10:22:47 +0100 |
| commit | 36f094ea3b06e6e87aaab756c3d69c09c60ad3a8 (patch) | |
| tree | 084009db933468417fa16d5d3b70b56c92873ae1 | |
| parent | 12813dee02a4537f8fd89d562f319d1caef5013b (diff) | |
| download | tailscale-36f094ea3b06e6e87aaab756c3d69c09c60ad3a8.tar.xz tailscale-36f094ea3b06e6e87aaab756c3d69c09c60ad3a8.zip | |
ipn/ipnlocal: deflake TestStateMachine{,Seamless} (#19475)
Remove the remaining known sources of flakiness in TestStateMachine and
TestStateMachineSeamless.
Updates tailscale/corp#36230
Updates #19377
Signed-off-by: James Sanderson <jsanderson@tailscale.com>
| -rw-r--r-- | ipn/ipnlocal/state_test.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ipn/ipnlocal/state_test.go b/ipn/ipnlocal/state_test.go index 5d29e3d2a..7e92647a6 100644 --- a/ipn/ipnlocal/state_test.go +++ b/ipn/ipnlocal/state_test.go @@ -19,7 +19,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "tailscale.com/cmd/testwrapper/flakytest" "tailscale.com/control/controlclient" "tailscale.com/envknob" "tailscale.com/ipn" @@ -378,7 +377,6 @@ func TestStateMachine(t *testing.T) { } func TestStateMachineSeamless(t *testing.T) { - flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/19377") runTestStateMachine(t, true) } @@ -878,7 +876,9 @@ func runTestStateMachine(t *testing.T, seamless bool) { // additional netmap updates. Since our LocalBackend instance already // has a netmap, we will reset it to nil to simulate the first netmap // retrieval. + b.mu.Lock() b.setNetMapLocked(nil) + b.mu.Unlock() cc.assertCalls("unpause") // // TODO: really the various GUIs and prefs should be refactored to @@ -1057,6 +1057,7 @@ func runTestStateMachine(t *testing.T, seamless bool) { } notifies.expect(1) // Fake a DERP connection. + b.awaitNoGoroutinesInTest() b.setWgengineStatus(&wgengine.Status{DERPs: 1, AsOf: time.Now()}, nil) { nn := notifies.drain(1) |
