seatlist: one test of the changed event heard before the seat answered, not two (issue 1966)
Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i
This commit is contained in:
@@ -226,26 +226,6 @@ func TestTheTwoToolsReadTheHeldListAndReadItAgainForTheirCallers(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// A reader started while the seat was silent reads the whole list at the first event the seat sends, and then acts on any module.
|
||||
func TestAReaderStartedWhileTheSeatWasSilentReadsTheWholeListAtItsFirstEvent(t *testing.T) {
|
||||
owner := &fakeOwner{down: true, table: map[string]string{"node-b": def("node-b", "node", "put"), "node-c": def("node-c", "node", "put")}}
|
||||
r, err := Start(Config{Bus: owner, Bootstrap: Bootstrapped()})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
<-r.Ready()
|
||||
if r.Status().Heard || r.MayAct("node-b") {
|
||||
t.Fatal("the silent seat was heard")
|
||||
}
|
||||
owner.down = false
|
||||
if err := owner.say(ChangedEvent, "node-b", SourceTrunk); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !r.Status().Heard || !r.MayAct("node-b") || !r.Has("node-c") {
|
||||
t.Fatalf("the event did not read the whole list: %+v", r.Status())
|
||||
}
|
||||
}
|
||||
|
||||
// A reader started while the seat was silent is heard at the seat's changed event: the whole list is read then (ADR 0636 §1).
|
||||
func TestAReaderStartedWhileTheSeatWasSilentIsHeardAtItsChangedEvent(t *testing.T) {
|
||||
owner := &fakeOwner{down: true}
|
||||
|
||||
Reference in New Issue
Block a user