Fix test_cleaning_policy_config ALRU assumptions
ALRU does not have a configurable sleep time between active awakenings of the cleaning thread. Once it starts cleaning, it does not back off unless staleness time and/or activity threshold constraints force it to do so. Changing test_cleaning_policy_config assumptions so that it only checks whether minimum expected amount of data is cleaned rather than assume exact amount of data to be cleaned. Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
parent
5256d704b3
commit
39fbe873df
@ -141,10 +141,13 @@ def test_cleaning_policy_config():
|
||||
f"Dirty data before pause: {core_dirty_before}\n"
|
||||
f"Dirty data after pause: {core_dirty_after}"
|
||||
)
|
||||
elif core_dirty_before != core_dirty_after + data_to_flush:
|
||||
# Only check whether a minimum amount of data is flushed, as ALRU does not have
|
||||
# a configurable sleep time between active flushing iterations which would allow
|
||||
# to precisely estimate expected amount of data.
|
||||
elif core_dirty_before < core_dirty_after + data_to_flush:
|
||||
TestRun.LOGGER.error(
|
||||
f"Number of dirty blocks flushed differs from configured in policy.\n"
|
||||
f"Expected dirty data flushed: {data_to_flush}\n"
|
||||
f"Expected minimum dirty data flushed: {data_to_flush}\n"
|
||||
f"Actual dirty data flushed: "
|
||||
f"{core_dirty_before - core_dirty_after}"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user