T2 amendment: a call after the stop began is answered nothing, never refused
A refusal would end the caller's kept call; left unanswered, the kept call paces and meets the new runner. The ask made once the drain began ends Unanswered, so the bus sends its caller nothing. Builds: design 47 H2 §813 (12), H-A-369
This commit is contained in:
@@ -27,7 +27,8 @@ while IFS= read -r line; do
|
||||
done
|
||||
`
|
||||
|
||||
// **The tool runner drains at a stop** (design 47 H2 §813 (12), H-A-342 (2), H-A-353): once it drains, no new call is taken; a call
|
||||
// **The tool runner drains at a stop** (design 47 H2 §813 (12), H-A-342 (2), H-A-353, H-A-369): once it drains, no new call is
|
||||
// taken and its caller is answered nothing (Unanswered), never refused; a call
|
||||
// in flight that ends within the drain bound is answered; one still in flight at the bound is cut, said with its bundle, its verb
|
||||
// and its age, and left unanswered (Unanswered, so the bus sends its caller nothing: a transport fault).
|
||||
func TestTheToolRunnerDrainsItsCallsInFlightAtAStop(t *testing.T) {
|
||||
@@ -36,7 +37,7 @@ func TestTheToolRunnerDrainsItsCallsInFlightAtAStop(t *testing.T) {
|
||||
bound time.Duration
|
||||
release bool
|
||||
}{
|
||||
{"a call that ends within the bound is answered, and a call after the stop is refused", 10 * time.Second, true},
|
||||
{"a call that ends within the bound is answered, and a call after the stop is answered nothing", 10 * time.Second, true},
|
||||
{"a call that outlives the bound is cut and said", 50 * time.Millisecond, false},
|
||||
} {
|
||||
t.Run(row.name, func(t *testing.T) {
|
||||
@@ -93,8 +94,9 @@ func TestTheToolRunnerDrainsItsCallsInFlightAtAStop(t *testing.T) {
|
||||
}
|
||||
}
|
||||
if row.release {
|
||||
if _, err := run("", json.RawMessage(`{}`)); err == nil || !strings.Contains(err.Error(), "takes no new call") {
|
||||
t.Errorf("a call made after the stop was answered %v, want it refused", err)
|
||||
var unanswered interface{ Unanswered() bool }
|
||||
if _, err := run("", json.RawMessage(`{}`)); !errors.As(err, &unanswered) || !unanswered.Unanswered() {
|
||||
t.Errorf("a call made after the stop ended %v, want it answered nothing, never refused", err)
|
||||
}
|
||||
f, err := os.OpenFile(hold, os.O_WRONLY, 0)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user