From 0b3b7019d98ed3559d8526d2ac82ace55c5ffeef Mon Sep 17 00:00:00 2001 From: raakella1 <114193113+raakella1@users.noreply.github.com> Date: Wed, 28 Feb 2024 15:06:24 -0800 Subject: [PATCH] fix the check in UT which is only valid in prerelease build (#338) Co-authored-by: Ravi Nagarjun Akella --- src/homelogstore/tests/test_log_store.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/homelogstore/tests/test_log_store.cpp b/src/homelogstore/tests/test_log_store.cpp index df6878c8f..cc4f5e00a 100644 --- a/src/homelogstore/tests/test_log_store.cpp +++ b/src/homelogstore/tests/test_log_store.cpp @@ -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