Say a timeout is not a failure, and where the controller keeps the answer (hq issue 265)

This commit is contained in:
jochen
2026-10-06 01:14:59 +02:00
parent 9730bd89c3
commit fce3dcb98d
3 changed files with 33 additions and 3 deletions
@@ -20,3 +20,18 @@ func TestARefusalIsSaidOnlyForTheBussOwn(t *testing.T) {
}
}
}
// **A timeout says it is not a failure** (novox/hq issue 265): a push that outlasted the wait had
// pushed, and the caller read "did not answer in time". And from the controller, where its answer is.
func TestATimeoutIsNotAFailure(t *testing.T) {
got := whyItFailed("seat:mesh-controller.push", errors.New("timeout"))
for _, want := range []string{"not a failure", "may already have done", "mesh-controller.calls"} {
if !strings.Contains(got, want) {
t.Errorf("a controller timeout does not say %q: %s", want, got)
}
}
if other := whyItFailed("novox/postgres.postgres_list_databases", errors.New("timeout")); !strings.Contains(other, "not a failure") ||
strings.Contains(other, "calls") {
t.Errorf("a module's timeout: %s", other)
}
}