Skip to content

Commit 2a1771e

Browse files
craig[bot]arulajmani
andcommitted
Merge #154396
154396: kv: make TestBoundedStalenessDataDriven work under multi-tenancy r=arulajmani a=arulajmani This test isn't set up for external-process multi-tenancy, but we can make it work for shared-process multi-tenancy. This patch does that. References #142800 Release note: None Co-authored-by: Arul Ajmani <[email protected]>
2 parents 70ad6fb + 6ade7ee commit 2a1771e

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

pkg/ccl/kvccl/kvfollowerreadsccl/boundedstaleness_test.go

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,6 @@ func TestBoundedStalenessDataDriven(t *testing.T) {
270270
ctx := context.Background()
271271

272272
clusterArgs := base.TestClusterArgs{
273-
ServerArgs: base.TestServerArgs{
274-
DefaultTestTenant: base.TODOTestTenantDisabled,
275-
},
276273
ServerArgsPerNode: map[int]base.TestServerArgs{},
277274
}
278275
const numNodes = 3
@@ -306,6 +303,14 @@ func TestBoundedStalenessDataDriven(t *testing.T) {
306303
tc := testcluster.StartTestCluster(t, 3, clusterArgs)
307304
defer tc.Stopper().Stop(ctx)
308305

306+
if tc.DefaultTenantDeploymentMode().IsExternal() {
307+
// This test wants to make assertions about local requests (requests to a
308+
// local replica) which is a concept that only applies to single-tenant
309+
// and shared-process deployment modes. Skip for external-process
310+
// multi-tenancy.
311+
skip.IgnoreLint(t, "test doesn't apply to external process multi-tenancy")
312+
}
313+
309314
savedTraceStmt := ""
310315
datadriven.RunTest(t, path, func(t *testing.T, d *datadriven.TestData) string {
311316
// Early exit non-query execution related commands.
@@ -364,6 +369,12 @@ func TestBoundedStalenessDataDriven(t *testing.T) {
364369
return err.Error()
365370
}
366371
return ""
372+
case "exec-system-tenant":
373+
_, err := tc.SystemLayer(0).SQLConn(t).Exec(d.Input)
374+
if err != nil {
375+
return err.Error()
376+
}
377+
return ""
367378
case "query":
368379
// Always show events.
369380
bse.setStmt(traceStmt)

pkg/ccl/kvccl/kvfollowerreadsccl/testdata/boundedstaleness/single_row

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# -ignore-wait-until-match as well. Check diff output carefully!
33

44
# Set a lower closed timestamp target to speed up time to reach follower reads.
5-
exec
5+
exec-system-tenant
66
SET CLUSTER SETTING kv.closed_timestamp.target_duration = '1s';
77
----
88

@@ -138,7 +138,7 @@ reset-matching-stmt-for-tracing
138138

139139

140140
# Set a super high closed bounded staleness target and execute a schema change.
141-
exec
141+
exec-system-tenant
142142
SET CLUSTER SETTING kv.closed_timestamp.target_duration = '1hr';
143143
----
144144

0 commit comments

Comments
 (0)