R1-3: the waiting read names a seat's stream by mesh-sdk's one derivation
seatStream derived the stream name itself and kept '.' where buscompose.SeatQueueStreamName writes '_'; QueueWaitingOf now calls buscompose (review round 1, finding 3, queue.go:34). Builds: design 47 H2 §777, H-A-410, P9
This commit is contained in:
@@ -222,9 +222,13 @@ func TestABundlePullsAndSettlesThroughItsModulesBus(t *testing.T) {
|
||||
}
|
||||
// Design 47 H2 H-A-410: the holder reads what waits on its own queue of the seat without consuming it (mesh/queue.waiting),
|
||||
// each ask with its id, the module that put it and its age; another module is refused, as is a seat it holds no queue of.
|
||||
waiting := func(want string) {
|
||||
waiting := func(want string, spelled ...string) {
|
||||
t.Helper()
|
||||
raw, err := building.Seat("waiting", json.RawMessage(`{"seat":"node-build-go"}`), nil)
|
||||
seat := "node-build-go"
|
||||
if len(spelled) > 0 {
|
||||
seat = spelled[0]
|
||||
}
|
||||
raw, err := building.Seat("waiting", json.RawMessage(`{"seat":"`+seat+`"}`), nil)
|
||||
var w bus.QueueWaiting
|
||||
if err != nil || json.Unmarshal(raw, &w) != nil || w.Capped {
|
||||
t.Fatalf("waiting = %s, %v", raw, err)
|
||||
@@ -274,4 +278,6 @@ func TestABundlePullsAndSettlesThroughItsModulesBus(t *testing.T) {
|
||||
t.Fatal(err)
|
||||
}
|
||||
waiting("mesh-delivery-pipeline:ask2:true:again")
|
||||
// the seat's stream is the one mesh-sdk's buscompose names, '.' as '_' too (H-A-410, P9)
|
||||
waiting("mesh-delivery-pipeline:ask2:true:again", "node-build.go")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user