Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
jaykorean committed May 10, 2024
1 parent 619b8b9 commit 7ece325
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions db_stress_tool/cf_consistency_stress.cc
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,26 @@ class CfConsistencyStressTest : public StressTest {
has_error = true;
break;
}

assert(cmp_s.ok() || cmp_s.IsNotFound());

if (s.IsNotFound()) {
if (cmp_s.ok()) {
fprintf(stderr,
"MultiGetEntity (AttributeGroup) returns different "
"results for key %s: CF %s "
"returns entity %s, CF %s returns not found\n",
key_slices[i].ToString(true).c_str(),
column_family_names_[0].c_str(),
WideColumnsToHex(cmp_columns).c_str(),
column_family_names_[j].c_str());
is_consistent = false;
break;
}

continue;
}

assert(s.ok());
if (cmp_s.IsNotFound()) {
fprintf(stderr,
Expand All @@ -561,8 +581,8 @@ class CfConsistencyStressTest : public StressTest {

if (columns != cmp_columns) {
fprintf(stderr,
"MultiGetEntity (AttributeGroup) returns different "
"results for key %s: CF %s "
"MultiGetEntity (AttributeGroup) returns different results "
"for key %s: CF %s "
"returns entity %s, CF %s returns entity %s\n",
key_slices[i].ToString(true).c_str(),
column_family_names_[0].c_str(),
Expand All @@ -575,7 +595,7 @@ class CfConsistencyStressTest : public StressTest {

if (!VerifyWideColumns(columns)) {
fprintf(stderr,
"MultiGetEntity (AttributeGroup) error: inconsistent "
"MultiGetEntity (AttributeGroup) error: inconsistent "
"columns for key %s, "
"entity %s\n",
key_slices[i].ToString(true).c_str(),
Expand Down

0 comments on commit 7ece325

Please sign in to comment.