docs(test): update stale comment after retry-delay became cancelable
aaec9e87 swapped the retry sleep for a select on ctx.Done. The test
comment in TestWaitForAgentctlHealth_HonoursContextCancellation still
described the old "subsequent time.Sleep is short" reasoning, which is
no longer how cancellation propagates — the select exits immediately
via ctx.Done() within the same iteration.
This commit is contained in:
@@ -125,8 +125,9 @@ func TestWaitForAgentctlHealth_HonoursContextCancellation(t *testing.T) {
|
||||
if !errors.Is(err, context.Canceled) {
|
||||
t.Fatalf("expected context cancellation, got %v", err)
|
||||
}
|
||||
// One Health() call before the loop notices cancellation; the subsequent
|
||||
// time.Sleep is short so cancellation gets observed promptly.
|
||||
// One Health() call before the loop notices cancellation; the cancelable
|
||||
// select exits immediately via ctx.Done() so cancellation is observed
|
||||
// within the same iteration.
|
||||
if got := atomic.LoadInt32(&stub.calls); got > 2 {
|
||||
t.Fatalf("expected ≤2 Health() calls before honouring cancellation, got %d", got)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user