You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test(grpc): use t.Context() for the consistency-loop RPCs
Replace context.Background() in Test_consistency_satisfy_write_after_
read_sequence and Test_grpc_transaction with the per-test t.Context().
Both tests now derive a single ctx at the top of the test body and
thread it through every RPC and retryNotLeader call. Two effects:
- Test-level cancel (timeout, parent stopping the test, t.Cleanup
draining) propagates into the in-flight RPC instead of leaking the
goroutine through context.Background until the gRPC call eventually
errors out on its own.
- The retry helper observes the same cancel signal, so a stalled
shutdown does not chase 9999 iterations of "leader not found"
retries past the point the test has been told to stop.
Behaviour-equivalent on the happy path; the consistency assertions
(assert.Equal / assert.Nil) are unchanged. Build / vet / lint clean,
both tests still pass at 9999 iterations locally.
0 commit comments