Skip to content

Commit

Permalink
sql: add consistent testing knobs to all tenants
Browse files Browse the repository at this point in the history
The tenant gRPC fanout tests that request statement statistics did not
consistently apply the testing knob added on the first tenant to the
other two. This commit copies the same testing knob value to those
tenants.

Release note: None
  • Loading branch information
dhartunian committed Nov 12, 2021
1 parent d9bed51 commit 0037326
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions pkg/ccl/serverccl/statusccl/tenant_grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,14 @@ func TestTenantGRPCServices(t *testing.T) {
server := testCluster.Server(0)

tenantID := serverutils.TestTenantID()
tenant, connTenant := serverutils.StartTenant(t, server, base.TestTenantArgs{
TenantID: tenantID,
TestingKnobs: base.TestingKnobs{
SQLStatsKnobs: &sqlstats.TestingKnobs{
AOSTClause: "AS OF SYSTEM TIME '-1us'",
},
testingKnobs := base.TestingKnobs{
SQLStatsKnobs: &sqlstats.TestingKnobs{
AOSTClause: "AS OF SYSTEM TIME '-1us'",
},
}
tenant, connTenant := serverutils.StartTenant(t, server, base.TestTenantArgs{
TenantID: tenantID,
TestingKnobs: testingKnobs,
})
defer connTenant.Close()

Expand Down Expand Up @@ -92,8 +93,9 @@ func TestTenantGRPCServices(t *testing.T) {

log.TestingClearServerIdentifiers()
tenant2, connTenant2 := serverutils.StartTenant(t, server, base.TestTenantArgs{
TenantID: tenantID,
Existing: true,
TenantID: tenantID,
Existing: true,
TestingKnobs: testingKnobs,
})
defer connTenant2.Close()

Expand All @@ -110,7 +112,8 @@ func TestTenantGRPCServices(t *testing.T) {

log.TestingClearServerIdentifiers()
tenant3, connTenant3 := serverutils.StartTenant(t, server, base.TestTenantArgs{
TenantID: roachpb.MakeTenantID(11),
TenantID: roachpb.MakeTenantID(11),
TestingKnobs: testingKnobs,
})
defer connTenant3.Close()

Expand Down

0 comments on commit 0037326

Please sign in to comment.