Skip to content

Commit 925a09d

Browse files
tmp commit
Signed-off-by: Stepan Bagritsevich <[email protected]>
1 parent 20fff0f commit 925a09d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/dragonfly/memory_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ async def test_eval_with_oom(df_factory: DflyInstanceFactory):
186186

187187

188188
@pytest.mark.asyncio
189+
@pytest.mark.parametrize("repeat", range(10))
189190
@pytest.mark.parametrize(
190191
"proactor_threads_param, maxmemory_param",
191192
[(1, 6 * (1024**3)), (4, 6 * (1024**3))],
@@ -194,6 +195,7 @@ async def test_cache_eviction_with_rss_deny_oom_simple_case(
194195
df_factory: DflyInstanceFactory,
195196
proactor_threads_param,
196197
maxmemory_param,
198+
repeat,
197199
):
198200
"""
199201
Test to verify that cache eviction is triggered even if used memory is small but rss memory is above limit
@@ -287,12 +289,13 @@ async def test_cache_eviction_with_rss_deny_oom_simple_case(
287289

288290

289291
@pytest.mark.asyncio
292+
@pytest.mark.parametrize("repeat", range(10))
290293
@pytest.mark.parametrize(
291294
"proactor_threads_param, maxmemory_param",
292295
[(1, 6 * (1024**3)), (4, 6 * (1024**3))],
293296
)
294297
async def test_cache_eviction_with_rss_deny_oom_two_waves(
295-
df_factory: DflyInstanceFactory, proactor_threads_param, maxmemory_param
298+
df_factory: DflyInstanceFactory, proactor_threads_param, maxmemory_param, repeat
296299
):
297300
"""
298301
Test to verify that cache eviction is triggered even if used memory is small but rss memory is above limit
@@ -372,7 +375,7 @@ async def test_cache_eviction_with_rss_deny_oom_two_waves(
372375
break
373376

374377
# Wait for some time
375-
await asyncio.sleep(6)
378+
await asyncio.sleep(3)
376379

377380
memory_arena = await async_client.execute_command("MEMORY", "ARENA")
378381
fragmentation_waste = extract_fragmentation_waste(memory_arena)

0 commit comments

Comments
 (0)