Fix test for change in behavior close to the min_resident_size boundary

This PR changed the behavior to match my expectation per my comment:
https://github.com/neondatabase/neon/pull/3809/files#r1149837135
This commit is contained in:
Heikki Linnakangas
2023-03-28 01:13:33 +03:00
parent b6b8265450
commit 11b16614a3

View File

@@ -204,9 +204,9 @@ def test_pageserver_respects_overridden_resident_size(eviction_env: EvictionEnv)
du_by_timeline[large_tenant] - du_by_timeline[small_tenant] > 5 * env.layer_size
), "ensure this test will do more than 1 eviction"
# give the larger tenant a haircut while prevening the smaller tenant from getting one
# give the larger tenant a haircut while preventing the smaller tenant from getting one
min_resident_size = du_by_timeline[small_tenant]
target = du_by_timeline[large_tenant] - du_by_timeline[small_tenant]
target = int((du_by_timeline[large_tenant] - du_by_timeline[small_tenant]) * 0.75)
assert any(
[du > min_resident_size for du in du_by_timeline.values()]
), "ensure the larger tenant will get a haircut"