From 41868a702e30643e87a1269e16ff522d3fd757b3 Mon Sep 17 00:00:00 2001 From: Aditya Dahale Date: Fri, 18 Sep 2026 21:11:17 +0530 Subject: [PATCH] fix(tp): relax strict upper bound check in TestBackoffBeforeDeadline When execution is fast, remaining time minus pollDeadlineSlack can be exactly 9s, causing o < 9*time.Second to fail with got 9s. Using <= avoids the flaky boundary failure while preserving the test invariant. --- tp/client_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tp/client_test.go b/tp/client_test.go index ba3d16e..abb58da 100644 --- a/tp/client_test.go +++ b/tp/client_test.go @@ -39,7 +39,7 @@ func TestBackoffBeforeDeadline(t *testing.T) { // before the deadline instead of after it. bo := boBeforeDeadline(ctx, time.Hour) assert.True(t, bo > 8*time.Second, "got %s", bo) - assert.True(t, bo < 9*time.Second, "got %s", bo) + assert.True(t, bo <= 9*time.Second, "got %s", bo) }) t.Run("deadline too close for another poll", func(t *testing.T) {