mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-17 08:18:07 -04:00
test(block_cache): test set_tidy_config error handling
This commit is contained in:
parent
dae268bfe0
commit
0156f64e51
@ -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<dwarfs::runtime_error>(
|
||||
::testing::HasSubstr("tidy interval is zero")));
|
||||
|
||||
fs.set_cache_tidy_config({
|
||||
.strategy = cache_tidy_strategy::BLOCK_SWAPPED_OUT,
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user