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 4383b00 commit 5690d68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions pkg/kv/kvserver/concurrency/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ go_test(
"//pkg/testutils",
"//pkg/testutils/datapathutils",
"//pkg/testutils/skip",
"//pkg/util",
"//pkg/util/allstacks",
"//pkg/util/hlc",
"//pkg/util/leaktest",
Expand Down
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 5690d68

Please sign in to comment.