Skip to content

Commit

Permalink
concurrency: deflake TestLockTableConcurrentRequests
Browse files Browse the repository at this point in the history
closes #123196

Epic: none

Release note: None
  • Loading branch information
arulajmani committed Apr 29, 2024
1 parent 83ef725 commit 25c0b92
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/kv/kvserver/concurrency/lock_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/storage/enginepb"
"github.com/cockroachdb/cockroach/pkg/testutils/datapathutils"
"github.com/cockroachdb/cockroach/pkg/util"
"github.com/cockroachdb/cockroach/pkg/util/hlc"
"github.com/cockroachdb/cockroach/pkg/util/leaktest"
"github.com/cockroachdb/cockroach/pkg/util/log"
Expand Down Expand Up @@ -1593,9 +1594,9 @@ func TestLockTableConcurrentRequests(t *testing.T) {
probDupAccessWithWeakerStr := 0.5
probOnlyRead := possibleProbOnlyRead[rng.Intn(len(possibleProbOnlyRead))]

if syncutil.DeadlockEnabled {
// We've seen 10,000 requests to be too much when running a deadlock build.
// Override numRequests to the lowest option (1,000) for deadlock builds.
if syncutil.DeadlockEnabled || util.RaceEnabled {
// We've seen 10,000 requests to be too much when running a deadlock/race
// build. Override numRequests to the lowest option (1,000) for such builds.
numRequests = 1000
}

Expand Down

0 comments on commit 25c0b92

Please sign in to comment.