Skip to content

Commit 36665f6

Browse files
craig[bot]koorosh
andcommitted
108017: sql: fix TestSQLStatsRegions flaky test r=koorosh a=koorosh This patch updates cluster settings that improves test stability and time of execution. Settings values were chosen based on multiple test runs with different values that have lower average time execution and don't cause flaky failures. Resolves: cockroachdb#107582 Release note: None Co-authored-by: Andrii Vorobiov <[email protected]>
2 parents 4fe2a80 + cb9cbc3 commit 36665f6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pkg/ccl/testccl/sqlstatsccl/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_test")
22

33
go_test(
44
name = "sqlstatsccl_test",
5+
# Explicitly indicate timeout as some of the tests (ie TestSQLStatsRegions) might take up to 3 min to run.
6+
timeout = "moderate",
57
srcs = [
68
"main_test.go",
79
"sql_stats_test.go",

pkg/ccl/testccl/sqlstatsccl/sql_stats_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ func TestSQLStatsRegions(t *testing.T) {
106106
// change, the test sometimes is flakey because the latency budget allocated
107107
// to closed timestamp propagation proves to be insufficient. This value is
108108
// very cautious, and makes this already slow test even slower.
109-
tdb.Exec(t, "SET CLUSTER SETTING kv.closed_timestamp.side_transport_interval = '50 ms'")
110-
tdb.Exec(t, `SET CLUSTER SETTING kv.closed_timestamp.lead_for_global_reads_override = '1500ms'`)
109+
tdb.Exec(t, "SET CLUSTER SETTING kv.closed_timestamp.side_transport_interval = '10ms'")
110+
tdb.Exec(t, `SET CLUSTER SETTING kv.closed_timestamp.lead_for_global_reads_override = '500ms'`)
111111
tdb.Exec(t, `ALTER TENANT ALL SET CLUSTER SETTING spanconfig.reconciliation_job.checkpoint_interval = '500ms'`)
112112

113113
tdb.Exec(t, "ALTER TENANT ALL SET CLUSTER SETTING sql.zone_configs.allow_for_secondary_tenant.enabled = true")

0 commit comments

Comments
 (0)