fix/268-lease-margin
Squashed from fix/268-lease-margin into main.
1 file changed,
+4
−1
internal/lease/checkpoint_test.go+4 −1
CI passed — run details
diff --git a/internal/lease/checkpoint_test.go b/internal/lease/checkpoint_test.go| index cca33dbe7..515d8c472 100644 |
| --- a/internal/lease/checkpoint_test.go |
| +++ b/internal/lease/checkpoint_test.go |
| @@ -340,7 +340,10 @@ func TestBlockedRenewalDeadlinePrecedesTakeover(t *testing.T) { |
| } |
| return nil |
| }} |
| - ttl := 900 * time.Millisecond |
| + // marginForTTL gives short test TTLs a margin of ttl/10. At 900ms that |
| + // was 90ms, less than a loaded CI runner's scheduling delay (#268); 3s |
| + // gives 300ms and checks the same property. Production's margin is 5s. |
| + ttl := 3 * time.Second |
| h := localHeld(t, backend, ttl) |
| until, e := h.SafeUntil() |
| if e != nil { |