From 603da07258f5ffffed92929b785e5bb4a9108a81 Mon Sep 17 00:00:00 2001 From: Slach Date: Fri, 26 Jul 2024 18:08:21 +0400 Subject: [PATCH] debug https://github.com/Altinity/clickhouse-backup/issues/888, trick for TestLongListRemote and build.yaml --- .github/workflows/build.yaml | 1 + test/integration/integration_test.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 979c1d10..3578eae7 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -315,6 +315,7 @@ jobs: export CUR_DIR="$(pwd)/test/integration" export CLICKHOUSE_BACKUP_BIN="$(pwd)/clickhouse-backup/clickhouse-backup-race" + docker compose -f "${CUR_DIR}/${COMPOSE_FILE}" pull go test -parallel ${RUN_PARALLEL} -timeout 60m -failfast -tags=integration -run "${RUN_TESTS:-.+}" -v test/integration/integration_test.go - name: Format integration coverage env: diff --git a/test/integration/integration_test.go b/test/integration/integration_test.go index a00bead2..68face4f 100644 --- a/test/integration/integration_test.go +++ b/test/integration/integration_test.go @@ -676,11 +676,11 @@ func TestLongListRemote(t *testing.T) { env.DockerExecNoError(r, "clickhouse-backup", "bash", "-ce", fmt.Sprintf("CLICKHOUSE_BACKUP_CONFIG=/etc/clickhouse-backup/config-s3.yml ALLOW_EMPTY_BACKUPS=true clickhouse-backup create_remote %s_%d", testBackupName, i)) } - env.DockerExecNoError(r, "clickhouse-backup", "rm", "-rfv", "/tmp/.clickhouse-backup-metadata.cache.S3") r.NoError(utils.ExecCmd(context.Background(), 180*time.Second, "docker", append(env.GetDefaultComposeCommand(), "restart", "minio")...)) time.Sleep(2 * time.Second) startFirst := time.Now() + env.DockerExecNoError(r, "clickhouse-backup", "rm", "-rfv", "/tmp/.clickhouse-backup-metadata.cache.S3") env.DockerExecNoError(r, "clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/config-s3.yml", "list", "remote") noCacheDuration := time.Since(startFirst) @@ -692,11 +692,11 @@ func TestLongListRemote(t *testing.T) { r.Greater(noCacheDuration, cachedDuration,"noCacheDuration=%s shall be greater cachedDuration=%s", noCacheDuration, cachedDuration) - env.DockerExecNoError(r, "clickhouse-backup", "rm", "-Rfv", "/tmp/.clickhouse-backup-metadata.cache.S3") r.NoError(utils.ExecCmd(context.Background(), 180*time.Second, "docker", append(env.GetDefaultComposeCommand(), "restart", "minio")...)) time.Sleep(2 * time.Second) startCacheClear := time.Now() + env.DockerExecNoError(r, "clickhouse-backup", "rm", "-Rfv", "/tmp/.clickhouse-backup-metadata.cache.S3") env.DockerExecNoError(r, "clickhouse-backup", "clickhouse-backup", "-c", "/etc/clickhouse-backup/config-s3.yml", "list", "remote") cacheClearDuration := time.Since(startCacheClear)