Fix tests

This commit is contained in:
Antonio Andelic 2023-06-05 09:47:58 +00:00
parent c4873027c3
commit ece96f54e9
2 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ namespace
std::string getSnapshotFileName(uint64_t up_to_log_idx, bool compress_zstd)
{
auto base = std::string{"snapshot_"} + std::to_string(up_to_log_idx) + ".bin";
auto base = fmt::format("snapshot_{}.bin", up_to_log_idx);
if (compress_zstd)
base += ".zstd";
return base;
@ -567,10 +567,8 @@ KeeperSnapshotManager::KeeperSnapshotManager(
continue;
}
if (clean_incomplete_file(it->path()))
continue;
snapshot_files.push_back(it->path());
if (it->name().starts_with("snapshot_") && !clean_incomplete_file(it->path()))
snapshot_files.push_back(it->path());
}
for (const auto & snapshot_file : snapshot_files)

View File

@ -1944,6 +1944,8 @@ TEST_P(CoordinationTest, TestCompressedLogsMultipleRewrite)
changelog1.end_of_append_batch(0, 0);
}
waitDurableLogs(changelog1);
DB::KeeperLogStore changelog2(
DB::LogFileSettings{.force_sync = true, .compress_logs = test_params.enable_compression, .rotate_interval = 100}, keeper_context);
changelog2.init(0, 3);