Skip to content

Commit 96e44cc

Browse files
committed
tests: also wait for full replication on sysbenchKV
Only the SQL flavor was previously checking for full replication.
1 parent 68fa71e commit 96e44cc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pkg/sql/tests/sysbench_test.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,17 @@ func newTestCluster(
188188
DisableLeaseQueue: true,
189189
},
190190
}
191-
return serverutils.StartCluster(b, nodes, base.TestClusterArgs{
191+
tc := serverutils.StartCluster(b, nodes, base.TestClusterArgs{
192192
ServerArgs: base.TestServerArgs{
193193
Settings: st,
194194
CacheSize: cacheSize,
195195
Knobs: knobs,
196196
}},
197197
)
198+
if nodes > 1 {
199+
try0(tc.WaitForFullReplication())
200+
}
201+
return tc
198202
}
199203

200204
// sysbenchSQL is SQL-based implementation of sysbenchDriver. It runs SQL
@@ -211,7 +215,6 @@ func newSysbenchSQL(nodes int, localRPCFastPath bool) sysbenchDriverConstructor
211215
for i := 0; i < nodes; i++ {
212216
tc.Server(i).SQLServer().(*sql.Server).GetExecutorConfig().LicenseEnforcer.Disable(ctx)
213217
}
214-
try0(tc.WaitForFullReplication())
215218
pgURL, cleanupURL := tc.ApplicationLayer(0).PGUrl(b, serverutils.DBName(sysbenchDB))
216219
cleanup := func() {
217220
cleanupURL()

0 commit comments

Comments
 (0)