Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
109719: startup: disable tenant in circuit breaker startup tests r=knz a=aliher1911

Previously test used default connection for cluster setup which could be set to tenant metamorphically. This is not good as it doesn't allow changing system settings.
This commit changes sql connection from application to system.

Epic: none
Fixes: cockroachdb#109572

Release note: None

Co-authored-by: Oleg Afanasyev <[email protected]>
  • Loading branch information
craig[bot] and aliher1911 committed Aug 30, 2023
2 parents 2059981 + 427b3da commit 7ed7f00
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/base/test_server_args.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ var (
// is attempted. This is the default behavior.
TestTenantProbabilisticOnly = DefaultTestTenantOptions{testBehavior: ttProb, allowAdditionalTenants: false}

// TestTenantProbabilisticOnly starts the test under a virtual
// TestTenantProbabilistic starts the test under a virtual
// cluster on a probabilistic basis. It allows the starting of
// additional virtual clusters.
TestTenantProbabilistic = DefaultTestTenantOptions{testBehavior: ttProb, allowAdditionalTenants: true}
Expand Down
2 changes: 1 addition & 1 deletion pkg/util/startup/startup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func runCircuitBreakerTestForKey(
require.NoError(t, tc.WaitFor5NodeReplication(), "failed to succeed 5x replication")

tc.ToggleReplicateQueues(false)
c := tc.ServerConn(0)
c := tc.Server(0).SystemLayer().SQLConn(t, "")
_, err := c.ExecContext(ctx, "set cluster setting kv.allocator.load_based_rebalancing='off'")
require.NoError(t, err, "failed to disable load rebalancer")
_, err = c.ExecContext(ctx,
Expand Down

0 comments on commit 7ed7f00

Please sign in to comment.