diff --git a/modules/mesh-provisioner-client/cmd/mesh-provisioner-client/client_test.go b/modules/mesh-provisioner-client/cmd/mesh-provisioner-client/client_test.go index fc71fca8..32067281 100644 --- a/modules/mesh-provisioner-client/cmd/mesh-provisioner-client/client_test.go +++ b/modules/mesh-provisioner-client/cmd/mesh-provisioner-client/client_test.go @@ -751,17 +751,17 @@ func TestNatsAFillThatFailedForWantOfTheSocketIsTriedWhenTheSocketReturns(t *tes func TestNatsAReturningSocketAsksNothingOfAModuleThatWasPlaced(t *testing.T) { b := startBus(t) - e := startEngine(t, map[string]string{dunstrc: "owned"}) + e := newEngine(t, map[string]string{dunstrc: "owned"}) + stop := e.listen(t) b.config(t, "dunst", "font-size", "13") b.assign(t, "dunst", dunst(t)) - c, _ := aClient(t, b, e, t.TempDir()) + aClient(t, b, e, t.TempDir()) eventually(t, "dunstrc is filled", func() bool { return strings.Contains(e.read(t, dunstrc), "Monospace 13") }) _, before := e.counts(dunstrc) - // A socket-up wake with nothing unplaced, then a later change as the proof the loop has run past it. - up := make(chan struct{}, 1) - c.SocketUp = up - _ = up + // The node-engine replaces itself: the socket goes and returns, and a later change proves the loop ran past it. + stop() + e.listen(t) b.config(t, "dunst", "font-size", "15") eventually(t, "the change is written", func() bool { return strings.Contains(e.read(t, dunstrc), "Monospace 15") }) _, after := e.counts(dunstrc)