Skip to content

Commit 913995c

Browse files
committed
roachtest: add startOpts.RoachprodOpts.SkipWaitForSQL
Adds the `SkipWaitForSQL` bool to roachprod `StartOpts` to allow tests to skip waiting for the SQL connection to be ready when quorum can't be reached intentionally. Closes: #141115 Release note: None
1 parent 1e5c41d commit 913995c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

pkg/cmd/roachtest/cluster.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2190,7 +2190,7 @@ func (c *clusterImpl) StartE(
21902190
}
21912191
}
21922192
// N.B. If `SkipInit` is set, we don't wait for SQL since node(s) may not join the cluster in any definite time.
2193-
if !startOpts.RoachprodOpts.SkipInit {
2193+
if !startOpts.RoachprodOpts.SkipInit && !startOpts.RoachprodOpts.SkipWaitForSQL {
21942194
// Wait for SQL to be ready on all nodes, for 'system' tenant, only.
21952195
for _, n := range nodes {
21962196
conn, err := c.ConnE(ctx, l, nodes[0], option.VirtualClusterName(install.SystemInterfaceName))

pkg/roachprod/install/cockroach.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ type StartOpts struct {
127127
// -- Options that apply only to StartDefault target --
128128

129129
SkipInit bool
130+
SkipWaitForSQL bool
130131
StoreCount int
131132
EncryptedStores bool
132133
// WALFailover, if non-empty, configures the value to supply to the

0 commit comments

Comments
 (0)