Skip to content

Commit

Permalink
fix the check in UT which is only valid in prerelease build (#338)
Browse files Browse the repository at this point in the history
Co-authored-by: Ravi Nagarjun Akella <raakella1@$HOSTNAME>
  • Loading branch information
raakella1 and Ravi Nagarjun Akella authored Feb 28, 2024
1 parent 6a0d49d commit 0b3b701
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/homelogstore/tests/test_log_store.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,10 +973,12 @@ TEST_F(LogStoreTest, TruncateDurability) {
SampleDB::instance().start_homestore(num_devs, dev_size_bytes, num_threads, num_logstores, true /* restart */);

_hs_log_store = SampleDB::instance().log_store_clients().back()->get_log_store();
#ifdef _PRERELEASE
// We are simulating a crash by setting the logstore_test_skip_persist flip which does not persist metablk
// This will invalidate truncate call above and set logstore to [1 100]
EXPECT_EQ(1ul, start_index(_hs_log_store));
EXPECT_EQ(last_idx + 1, next_slot(_hs_log_store));
#endif

// fast_forward should be resilient to crashe and should be able to recover

Expand Down

0 comments on commit 0b3b701

Please sign in to comment.