Answer-time tests check the answer, not wall-clock milliseconds (closes #316)
check / check (push) Waiting to run
check / check (push) Waiting to run
The waf test that asks a question while every outside source hangs now runs it in a synctest bubble and checks that the answer comes after exactly the GeoJS wait, within the time limit. GeoJS is the silent stand-in; the lists are fetched outside the bubble. The routewatch test for a hanging routewatch checks that Route answers no_answer_yet instead of timing it. Model: opus-5-5
This commit is contained in:
1 parent
eba697af48
commit
0e62e7efc5
2 files changed
+53
-36
No files matched your search
@@ -291,12 +291,11 @@ func TestHangingRoutewatchNeverDelaysAndFailsTheQuery(t *testing.T) {
|
||||
<-r.Context().Done()
|
||||
})
|
||||
|
||||
start := time.Now()
|
||||
|
||||
f.route()
|
||||
|
||||
if elapsed := time.Since(start); elapsed > time.Second {
|
||||
t.Errorf("Route took %s while routewatch hangs", elapsed)
|
||||
// Route answers no_answer_yet while the query is under way, and
|
||||
// request_failed once it has failed, after queryTimeout.
|
||||
if _, missing := f.route(); missing != routewatch.NoAnswerYet {
|
||||
t.Errorf("Route gave %q while routewatch hangs, want %q",
|
||||
missing, routewatch.NoAnswerYet)
|
||||
}
|
||||
|
||||
f.waitFor(routewatch.RequestFailed)
|
||||
|
||||
Reference in new issue
Block a user