Skip to content

Commit 47b62cd

Browse files
committed
improve TestRestoreDistributedCluster
1 parent 1f44a50 commit 47b62cd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎test/integration/integration_test.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2978,16 +2978,16 @@ func TestRestoreDistributedCluster(t *testing.T) {
29782978

29792979
// remove cluster and wait configuration reload
29802980
env.DockerExecNoError(r, "clickhouse", "bash", "-c", "rm -rfv /etc/clickhouse-server/config.d/new-cluster.xml")
2981-
env.queryWithNoError(r, "SYSTEM RELOAD CONFIG")
29822981
newClusterExists := uint64(1)
29832982
for i := 0; i < 60 && newClusterExists == 1; i++ {
2983+
env.queryWithNoError(r, "SYSTEM RELOAD CONFIG")
29842984
r.NoError(env.ch.SelectSingleRowNoCtx(&newClusterExists, "SELECT count() FROM system.clusters WHERE cluster='new_cluster'"))
29852985
if newClusterExists == 0 {
29862986
break
29872987
}
29882988
time.Sleep(1 * time.Second)
29892989
}
2990-
r.Equal(uint64(0), newClusterExists)
2990+
r.Equal(uint64(0), newClusterExists, "new_cluster shall not present in system.clusters")
29912991

29922992
// Restore using `CLICKHOUSE_RESTORE_DISTRIBUTED_CLUSTER` and `RESTORE_SCHEMA_ON_CLUSTER`
29932993
env.DockerExecNoError(r, "clickhouse-backup", "bash", "-c", fmt.Sprintf("RESTORE_SCHEMA_ON_CLUSTER='%s' CLICKHOUSE_RESTORE_DISTRIBUTED_CLUSTER='%s' clickhouse-backup -c /etc/clickhouse-backup/config-s3.yml restore %s", tc.RestoreSchemaOnCluster, tc.RestoreDistributedCluster, backupName))

0 commit comments

Comments
 (0)