|
|
|
@@ -150,7 +150,7 @@ func busCondition(key, id, headline, needs string) asks.Condition {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 1218/AC1 and 1218/AC2: a raised condition said on the one subject reaches the desk, is recorded and its work item
|
|
|
|
|
// is acknowledged; its cleared form ends it. The router holds a warning for its start grace and burst window.
|
|
|
|
|
// is acknowledged; its cleared form ends it. The bundle starts with a short grace (bus_test.go).
|
|
|
|
|
func TestAConditionSaidOnTheOneSubjectReachesTheDeskAndIsClearedOverTheBus(t *testing.T) {
|
|
|
|
|
b := newConditionBed(t)
|
|
|
|
|
b.say(t, "mesh-delivery-teller", busCondition("merge.d-7.stalled", "d-7", "A merge waits on a check", "release it, or stop it."))
|
|
|
|
@@ -160,7 +160,7 @@ func TestAConditionSaidOnTheOneSubjectReachesTheDeskAndIsClearedOverTheBus(t *te
|
|
|
|
|
return rec != nil && rec.Origin == "condition" && rec.Cleared.IsZero()
|
|
|
|
|
})
|
|
|
|
|
b.r.until("the work item is acknowledged", 30*time.Second, func() bool { return b.acknowledged(1) })
|
|
|
|
|
b.r.until("the desk is sent the condition", 3*time.Minute, func() bool {
|
|
|
|
|
b.r.until("the desk is sent the condition", 15*time.Second, func() bool {
|
|
|
|
|
for _, m := range b.told() {
|
|
|
|
|
if strings.Contains(m.Title+m.Body, "A merge waits on a check") {
|
|
|
|
|
return true
|
|
|
|
@@ -193,7 +193,7 @@ func TestAWarningThatNeedsNothingReachesNoChannelOverTheBus(t *testing.T) {
|
|
|
|
|
b.say(t, "mesh-delivery-teller", busCondition("merge.d-8.quiet", "d-8", "A quiet merge note", ""))
|
|
|
|
|
b.r.until("the quiet warning is recorded", 30*time.Second, func() bool { return b.record("merge.d-8.quiet") != nil })
|
|
|
|
|
b.say(t, "mesh-delivery-teller", busCondition("merge.d-9.loud", "d-9", "A loud merge note", "release it, or stop it."))
|
|
|
|
|
b.r.until("the warning that needs the operator is sent to the desk", 3*time.Minute, func() bool {
|
|
|
|
|
b.r.until("the warning that needs the operator is sent to the desk", 15*time.Second, func() bool {
|
|
|
|
|
for _, m := range b.told() {
|
|
|
|
|
if strings.Contains(m.Title+m.Body, "A loud merge note") {
|
|
|
|
|
return true
|
|
|
|
|