Skip to content

Commit

Permalink
snapshot multithread test 5
Browse files Browse the repository at this point in the history
  • Loading branch information
pippocao committed Oct 9, 2024
1 parent 0b9ed6b commit ad87076
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_log_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,11 +880,11 @@ namespace bq {
bq::string snapshot = log_inst_ptr->take_snapshot(false);
if (!snapshot.is_empty()) {
bq::string hex_standard = to_hex(*output_str_ptr);
result_ptr->add_result(snapshot.size() >= output_str_ptr->size(), "snapshot size test failed, index:%zu, \nstandard: %s, \nstandard size:%zu, snapshot size:%zu \nsnapshot: %s", current_tested_num, hex_standard.c_str(), output_str_ptr->size(), snapshot.size(), to_hex(snapshot).c_str());
result_ptr->add_result(snapshot.size() >= output_str_ptr->size(), "snapshot size test failed, index:%zu, \nstandard: %s\nstandard: %s\nstandard size:%zu, snapshot size:%zu \nsnapshot: %s\nsnapshot: %s", current_tested_num, output_str_ptr->c_str(), hex_standard.c_str(), output_str_ptr->size(), snapshot.size(), snapshot.c_str(), to_hex(snapshot).c_str());
if (snapshot.size() >= output_str_ptr->size()) {
bq::string last_snapshot = snapshot.substr(snapshot.size() - output_str_ptr->size(), output_str_ptr->size());
bq::string hex_last_snapshot = to_hex(last_snapshot);
result_ptr->add_result(snapshot.end_with(snapshot_test_str) || snapshot_test_str.end_with(snapshot), "snapshot test failed, index:%zu, \nstandard: %s, \nstandard size:%zu, snapshot size:%zu \nsnapshot: %s", current_tested_num, hex_standard.c_str(), output_str_ptr->size(), last_snapshot.size(), hex_last_snapshot.c_str());
result_ptr->add_result(snapshot.end_with(snapshot_test_str) || snapshot_test_str.end_with(snapshot), "snapshot test failed, index:%zu, \nstandard: %s\nstandard: %s\nstandard size:%zu, snapshot size:%zu \nsnapshot: %s\nsnapshot: %s", current_tested_num, output_str_ptr->c_str(), hex_standard.c_str(), output_str_ptr->size(), last_snapshot.size(), last_snapshot.c_str(), hex_last_snapshot.c_str());
}
}
snapshot_idx_mode = (snapshot_idx_mode % 1024) + 1;
Expand Down

0 comments on commit ad87076

Please sign in to comment.