chore(model): deflake cluster config tests (#10662)
These have been flaky for a long time, seemingly because the multiple connection code slightly changed the timing of cluster config sending by moving them to the connection promotion loop. This adds some resiliency to that, instead of assuming that the CC:s will be immediately available after adding the connection. --------- Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -3680,15 +3680,17 @@ func testConfigChangeTriggersClusterConfigs(t *testing.T, expectFirst, expectSec
|
||||
m.promoteConnections()
|
||||
|
||||
// Initial CCs
|
||||
initTimeout := time.NewTimer(time.Second)
|
||||
defer initTimeout.Stop()
|
||||
select {
|
||||
case <-cc1:
|
||||
default:
|
||||
t.Fatal("missing initial CC from device1")
|
||||
case <-initTimeout.C:
|
||||
t.Fatal("timed out waiting for initial CC from device1")
|
||||
}
|
||||
select {
|
||||
case <-cc2:
|
||||
default:
|
||||
t.Fatal("missing initial CC from device2")
|
||||
case <-initTimeout.C:
|
||||
t.Fatal("timed out waiting for initial CC from device2")
|
||||
}
|
||||
|
||||
t.Log("Applying config change")
|
||||
|
||||
Reference in New Issue
Block a user