diff --git a/internal/agent/agent_test.go b/internal/agent/agent_test.go index 74c5d69..87a4a2b 100644 --- a/internal/agent/agent_test.go +++ b/internal/agent/agent_test.go @@ -1604,8 +1604,20 @@ func TestTheNodesOwnCompositionIsAppliedWhenItDiffersAndARecordMoveWaitsForAYes( } eventually(t, "the wait for the composer was not said", func() bool { return saidCount() == 1 }) // Settled again by another want's change, it is neither said nor told again. - want("web", fp, "") - b.wants.put(gk, graw) + other, oraw, _ := unsigned("ghost", fpOf("8"), file("ghost", "x", "1")) + settledGhost := func() (n int) { + b.mu.Lock() + defer b.mu.Unlock() + for _, m := range b.settled { + if m == "ghost" { + n++ + } + } + return n + } + settledBefore := settledGhost() + b.comps.put(other, oraw) + eventually(t, "ghost was not settled again", func() bool { return settledGhost() > settledBefore }) eventually(t, "the composer was not told", func() bool { toldMu.Lock(); defer toldMu.Unlock(); return len(told) == 1 }) if _, err := b.ag.Composition(context.Background(), "ghost", "", false); err == nil || !strings.Contains(err.Error(), "waits for the composer: no manifest in the composer's picture") { t.Errorf("the composition read of ghost says %v, want why the composer made none", err)