Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
zwang28 committed Jun 13, 2024
1 parent bc80e4a commit 45f0d01
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/storage/backup/integration_tests/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -173,17 +173,13 @@ function get_total_sst_count() {
}

function get_max_committed_epoch_in_backup() {
local id
id=$1
sed_str="s/.*\"state_table_info\":{\"${id}\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\1/p"
sed_str="s/.*\"state_table_info\":{\"[[:digit:]]*\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\1/p"
${BACKUP_TEST_MCLI} -C "${BACKUP_TEST_MCLI_CONFIG}" \
cat "hummock-minio/hummock001/backup/manifest.json" | sed -n "${sed_str}"
}

function get_safe_epoch_in_backup() {
local id
id=$1
sed_str="s/.*\"state_table_info\":{\"${id}\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\2/p"
sed_str="s/.*\"state_table_info\":{\"[[:digit:]]*\":{\"committedEpoch\":\"\([[:digit:]]*\)\",\"safeEpoch\":\"\([[:digit:]]*\)\"}.*/\2/p"
${BACKUP_TEST_MCLI} -C "${BACKUP_TEST_MCLI_CONFIG}" \
cat "hummock-minio/hummock001/backup/manifest.json" | sed -n "${sed_str}"
}
Expand Down
5 changes: 2 additions & 3 deletions src/storage/backup/integration_tests/test_query_backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ select * from t1;

job_id=$(backup)
echo "${job_id}"
table_id=1
backup_mce=$(get_max_committed_epoch_in_backup "${table_id}")
backup_safe_epoch=$(get_safe_epoch_in_backup "${table_id}")
backup_mce=$(get_max_committed_epoch_in_backup)
backup_safe_epoch=$(get_safe_epoch_in_backup)
echo "backup MCE: ${backup_mce}"
echo "backup safe_epoch: ${backup_safe_epoch}"

Expand Down

0 comments on commit 45f0d01

Please sign in to comment.