Skip to content

Commit

Permalink
kvfollowerreadsccl: skip tests that break when run as secondary tenants
Browse files Browse the repository at this point in the history
We probabilistically run SQL using secondary tenant connections
in tests. This breaks TestBoundedStalenessDataDriven and
TestFollowerReadsWithStaleDescriptor.

Both these tests configure SQL testing knobs to trace statements and
then make assertions on the collected traces. As these testing knobs
aren't shared by the secondary tenant `TestServer` starts the test
simply doesn't work. For now, we simply eschew running these tests with
secondary tenants.

Release note: None
  • Loading branch information
arulajmani committed Aug 14, 2022
1 parent 8ebdf27 commit a7d5abf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/ccl/kvccl/kvfollowerreadsccl/boundedstaleness_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,7 @@ func TestBoundedStalenessDataDriven(t *testing.T) {
for i := 0; i < numNodes; i++ {
i := i
clusterArgs.ServerArgsPerNode[i] = base.TestServerArgs{
DisableDefaultTestTenant: true,
Knobs: base.TestingKnobs{
SQLExecutor: &sql.ExecutorTestingKnobs{
WithStatementTrace: func(trace tracingpb.Recording, stmt string) {
Expand Down
8 changes: 6 additions & 2 deletions pkg/ccl/kvccl/kvfollowerreadsccl/followerreads_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -568,13 +568,17 @@ func TestFollowerReadsWithStaleDescriptor(t *testing.T) {
tc := testcluster.StartTestCluster(t, 4,
base.TestClusterArgs{
ReplicationMode: base.ReplicationManual,
ServerArgs: base.TestServerArgs{UseDatabase: "t"},
ServerArgs: base.TestServerArgs{
DisableDefaultTestTenant: true,
UseDatabase: "t",
},
// n4 pretends to have low latency to n2 and n3, so that it tries to use
// them for follower reads.
// Also, we're going to collect a trace of the test's final query.
ServerArgsPerNode: map[int]base.TestServerArgs{
3: {
UseDatabase: "t",
DisableDefaultTestTenant: true,
UseDatabase: "t",
Knobs: base.TestingKnobs{
KVClient: &kvcoord.ClientTestingKnobs{
// Inhibit the checking of connection health done by the
Expand Down

0 comments on commit a7d5abf

Please sign in to comment.