Skip to content

Commit

Permalink
kvstreamer: speed up TestStreamerVaryingResponseSizes
Browse files Browse the repository at this point in the history
We just saw a test timeout due to BatchBytesLimit randomization, so this
commit disables batch randomizations for `TestStreamerVaryingResponseSizes`.

Release note: None
  • Loading branch information
yuzefovich committed Apr 25, 2024
1 parent 87e816d commit 23f29f3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/kv/kvclient/kvstreamer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ go_test(
"//pkg/settings/cluster",
"//pkg/sql",
"//pkg/sql/rowcontainer",
"//pkg/sql/sem/eval",
"//pkg/storage",
"//pkg/testutils/serverutils",
"//pkg/testutils/skip",
Expand Down
11 changes: 10 additions & 1 deletion pkg/kv/kvclient/kvstreamer/streamer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
"github.com/cockroachdb/cockroach/pkg/kv/kvserver/concurrency/lock"
"github.com/cockroachdb/cockroach/pkg/roachpb"
"github.com/cockroachdb/cockroach/pkg/settings/cluster"
"github.com/cockroachdb/cockroach/pkg/sql/sem/eval"
"github.com/cockroachdb/cockroach/pkg/testutils/serverutils"
"github.com/cockroachdb/cockroach/pkg/testutils/skip"
"github.com/cockroachdb/cockroach/pkg/testutils/sqlutils"
Expand Down Expand Up @@ -554,7 +555,15 @@ func TestStreamerVaryingResponseSizes(t *testing.T) {

skip.UnderDuress(t)

s, db, _ := serverutils.StartServer(t, base.TestServerArgs{})
s, db, _ := serverutils.StartServer(t, base.TestServerArgs{
Knobs: base.TestingKnobs{
SQLEvalContext: &eval.TestingKnobs{
// We disable the randomization of some batch sizes because with
// some low values the test takes much longer.
ForceProductionValues: true,
},
},
})
defer s.Stopper().Stop(context.Background())

runner := sqlutils.MakeSQLRunner(db)
Expand Down

0 comments on commit 23f29f3

Please sign in to comment.