Skip to content

Commit

Permalink
refactor: small fixes of tests
Browse files Browse the repository at this point in the history
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
  • Loading branch information
BagritsevichStepan committed Nov 21, 2024
1 parent 32440fc commit e8527b9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/dragonfly/memory_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,17 +119,16 @@ async def test_rss_oom_ratio(df_factory: DflyInstanceFactory, admin_port):
}
)
async def test_cache_eviction_with_rss_deny_oom(
client: aioredis.Redis,
df_server: DflyInstance,
):
"""
Test to verify that cache eviction is triggered even if used memory is small but rss memory is above limit
"""

client = df_server.client()

max_memory = 256 * 1024 * 1024 # 256 MB
first_fill_size = int(0.15 * max_memory) # 20% of max memory
second_fill_size = int(0.3 * max_memory) # Another 20% of max memory
first_fill_size = int(0.2 * max_memory) # 15% of max memory
second_fill_size = int(0.35 * max_memory) # Another 20% of max memory
rss_increase_size = int(0.3 * max_memory) # 30% of max memory

key_size = 1024 # 1 mb
Expand Down

0 comments on commit e8527b9

Please sign in to comment.