Skip to content

Commit

Permalink
Merge pull request #124081 from cockroachdb/blathers/backport-release…
Browse files Browse the repository at this point in the history
…-24.1-124034

release-24.1: roachtest: fix maxWaitDuration in lease-preferences
  • Loading branch information
nvanbenschoten authored May 21, 2024
2 parents e761c57 + af4ebd9 commit df782c7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/cmd/roachtest/tests/lease_preferences.go
Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,12 @@ func waitForLeasePreferences(
var ret leasePreferencesResult
ret.nodes = nodes
start := timeutil.Now()
maxWaitC := time.After(maxWaitDuration)
for {
select {
case <-ctx.Done():
return ret, ctx.Err()
case <-time.After(maxWaitDuration):
case <-maxWaitC:
return ret, errors.Errorf("timed out before lease preferences satisfied")
case <-checkTimer.C:
checkTimer.Read = true
Expand Down

0 comments on commit df782c7

Please sign in to comment.