Wait for the whole start pass before serving a served test, so a rotation test never reads it midway (issue 1945)

This commit is contained in:
2026-10-24 23:48:51 +02:00
parent 0af12b369b
commit a3f1d0460d
@@ -240,10 +240,16 @@ func aServedMesh(t *testing.T) *servedMesh {
}
handingOver.Store(false)
})
// Served once both nodes have their own composition: the start's pass ran.
for _, node := range []string{"anchor", "laptop"} {
own, _ := sdkdelivery.ComposedNodeKey(node)
m.waitFor(t, done, node, own, 0)
// Served once both nodes have their own composition and their module's: the start's pass wrote them all. A node's
// compositions are written in key order, so anchor's own comes before its store's (issue 1945: a test that reads the
// revisions at once must not catch the pass midway).
for _, k := range []struct{ node, module, fp string }{{"anchor", "", ""}, {"laptop", "", ""}, {"anchor", "store", fpOf('a')},
{"laptop", "board", fpOf('b')}} {
key, _ := sdkdelivery.ComposedNodeKey(k.node)
if k.module != "" {
key, _ = sdkdelivery.ComposedKey(k.node, k.module, k.fp)
}
m.waitFor(t, done, k.node, key, 0)
}
return m
}