diff --git a/test/block_cache_test.cpp b/test/block_cache_test.cpp index aef60d98..7c5a60ee 100644 --- a/test/block_cache_test.cpp +++ b/test/block_cache_test.cpp @@ -184,6 +184,19 @@ TEST_P(options_test, cache_stress) { }; filesystem_v2 fs(lgr, mm, opts); + EXPECT_NO_THROW( + fs.set_cache_tidy_config({.strategy = cache_tidy_strategy::NONE})); + + EXPECT_THAT( + [&] { + fs.set_cache_tidy_config({ + .strategy = cache_tidy_strategy::BLOCK_SWAPPED_OUT, + .interval = std::chrono::seconds::zero(), + }); + }, + ::testing::ThrowsMessage( + ::testing::HasSubstr("tidy interval is zero"))); + fs.set_cache_tidy_config({ .strategy = cache_tidy_strategy::BLOCK_SWAPPED_OUT, });