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>
This commit is contained in:
committed by
GitHub
parent
12813dee02
commit
36f094ea3b
@@ -19,7 +19,6 @@ import (
|
|||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/google/go-cmp/cmp/cmpopts"
|
"github.com/google/go-cmp/cmp/cmpopts"
|
||||||
|
|
||||||
"tailscale.com/cmd/testwrapper/flakytest"
|
|
||||||
"tailscale.com/control/controlclient"
|
"tailscale.com/control/controlclient"
|
||||||
"tailscale.com/envknob"
|
"tailscale.com/envknob"
|
||||||
"tailscale.com/ipn"
|
"tailscale.com/ipn"
|
||||||
@@ -378,7 +377,6 @@ func TestStateMachine(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestStateMachineSeamless(t *testing.T) {
|
func TestStateMachineSeamless(t *testing.T) {
|
||||||
flakytest.Mark(t, "https://github.com/tailscale/tailscale/issues/19377")
|
|
||||||
runTestStateMachine(t, true)
|
runTestStateMachine(t, true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -878,7 +876,9 @@ func runTestStateMachine(t *testing.T, seamless bool) {
|
|||||||
// additional netmap updates. Since our LocalBackend instance already
|
// additional netmap updates. Since our LocalBackend instance already
|
||||||
// has a netmap, we will reset it to nil to simulate the first netmap
|
// has a netmap, we will reset it to nil to simulate the first netmap
|
||||||
// retrieval.
|
// retrieval.
|
||||||
|
b.mu.Lock()
|
||||||
b.setNetMapLocked(nil)
|
b.setNetMapLocked(nil)
|
||||||
|
b.mu.Unlock()
|
||||||
cc.assertCalls("unpause")
|
cc.assertCalls("unpause")
|
||||||
//
|
//
|
||||||
// TODO: really the various GUIs and prefs should be refactored to
|
// 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)
|
notifies.expect(1)
|
||||||
// Fake a DERP connection.
|
// Fake a DERP connection.
|
||||||
|
b.awaitNoGoroutinesInTest()
|
||||||
b.setWgengineStatus(&wgengine.Status{DERPs: 1, AsOf: time.Now()}, nil)
|
b.setWgengineStatus(&wgengine.Status{DERPs: 1, AsOf: time.Now()}, nil)
|
||||||
{
|
{
|
||||||
nn := notifies.drain(1)
|
nn := notifies.drain(1)
|
||||||
|
|||||||
Reference in New Issue
Block a user