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:
Jakob Borg
2026-04-24 07:41:17 +00:00
committed by GitHub
parent 2850b3a46c
commit 36c3331696
+6 -4
View File
@@ -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")