Assert the controller's buckets before the served test's fixture writes the chain (issue 1945)
This commit is contained in:
@@ -148,6 +148,15 @@ func aServedMesh(t *testing.T) *servedMesh {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Cleanup(chainConn.Close)
|
t.Cleanup(chainConn.Close)
|
||||||
|
// The controller's own buckets, the chain's among them, as it asserts them at its start.
|
||||||
|
asserter, err := broker.Dial(u.String())
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
t.Cleanup(asserter.Close)
|
||||||
|
if err := asserter.EnsureControllerBuckets(); err != nil {
|
||||||
|
t.Fatalf("the controller's buckets: %v", err)
|
||||||
|
}
|
||||||
c, err := chain.OnTheBus(ctx, chainConn, func(context.Context) error { return nil })
|
c, err := chain.OnTheBus(ctx, chainConn, func(context.Context) error { return nil })
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user