Delete the declarations' stream once every node runs the new node-engine, and assert it no more (issue 1945, B13)
A node away during the switch finds its last declaration on the stream; once every node's have names the node-engine registered, no node reads one, so the stream and the nodes' consumers on it go, said once, and a raise leaves them out (ADR 0539 clause 11).
This commit is contained in:
@@ -91,3 +91,22 @@ func TestTheReplacedControllerIsItsNewestEarlierBuild(t *testing.T) {
|
||||
t.Errorf("a controller with no earlier build replaced one")
|
||||
}
|
||||
}
|
||||
|
||||
// 1945/AC14 (unit half): the declarations' stream stays while one node's have names another node-engine than the one
|
||||
// registered, or none, and goes once every node's names it.
|
||||
func TestTheDeclarationsGoOnlyOnceEveryNodeRunsTheNewEngine(t *testing.T) {
|
||||
n6 := sdkdelivery.SourcePrefix2 + strings.Repeat("6", 64)
|
||||
nodes := []string{"ace", "g14", "novox"}
|
||||
if declarationsDone(nodes, map[string]string{"ace": n6, "novox": n6}, n6) {
|
||||
t.Errorf("done while g14 says nothing (it sleeps)")
|
||||
}
|
||||
if declarationsDone(nodes, map[string]string{"ace": n6, "g14": "src2:old", "novox": n6}, n6) {
|
||||
t.Errorf("done while g14 runs the old node-engine")
|
||||
}
|
||||
if !declarationsDone(nodes, map[string]string{"ace": n6, "g14": n6, "novox": n6}, n6) {
|
||||
t.Errorf("not done with every node on the new node-engine")
|
||||
}
|
||||
if declarationsDone(nodes, map[string]string{"ace": "", "g14": "", "novox": ""}, "") || declarationsDone(nil, nil, n6) {
|
||||
t.Errorf("done with no fingerprint registered, or no node")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user