Skip to content

Commit c8b2ee9

Browse files
authored
Merge pull request cockroachdb#159800 from tbg/blathers/backport-release-24.3-159704
release-24.3: logictest: use unique TestClusterName
2 parents 0fffc2a + 90782f6 commit c8b2ee9

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

pkg/ccl/logictestccl/testdata/logic_test/crdb_internal_tenant

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -559,10 +559,10 @@ RESET application_name 0 0
559559
SELECT IF(nextval(_) < _, crdb_internal.force_retry(_), _) 2 1
560560
SELECT IF(nextval(_) < _, crdb_internal.force_retry(_::INTERVAL), _) 0 1
561561

562-
query T
563-
SELECT crdb_internal.cluster_name()
562+
query B
563+
SELECT length(crdb_internal.cluster_name()) > 0
564564
----
565-
testclustername
565+
true
566566

567567
# Regression for 41834.
568568
statement ok

pkg/sql/logictest/logic.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1547,7 +1547,6 @@ func (t *logicTest) newCluster(
15471547
IgnoreOnDeleteRangeError: ignoreMVCCRangeTombstoneErrors,
15481548
},
15491549
},
1550-
ClusterName: "testclustername",
15511550
ExternalIODir: t.sharedIODir,
15521551
},
15531552
// For distributed SQL tests, we use the fake span resolver; it doesn't

pkg/sql/logictest/testdata/logic_test/crdb_internal

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1017,10 +1017,10 @@ start_pretty
10171017
/Table/117/1/2
10181018
/Table/117/1/3
10191019

1020-
query T
1021-
SELECT crdb_internal.cluster_name()
1020+
query B
1021+
SELECT length(crdb_internal.cluster_name()) > 0
10221022
----
1023-
testclustername
1023+
true
10241024

10251025
# Regression for 41834.
10261026
statement ok

pkg/testutils/testcluster/testcluster.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ func NewTestCluster(
261261
// concise and recognizable.
262262
clusterArgs.ServerArgs.ClusterName = fmt.Sprintf("TestCluster-%s",
263263
randutil.RandString(rng, 10, randutil.PrintableKeyAlphabet))
264+
} else {
265+
t.Logf("WARNING: TestCluster using non-unique ClusterName %q; "+
266+
"concurrent tests may collide (see #157868)", clusterArgs.ServerArgs.ClusterName)
264267
}
265268

266269
if err := checkServerArgsForCluster(

0 commit comments

Comments
 (0)