mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Fix race condition in lazy free test (#9682)
The first test exited before all the memory was reclaimed, so when the second test sampled used_memory, it was too early.
This commit is contained in:
parent
665e428435
commit
37559ca79f
@ -19,6 +19,13 @@ start_server {tags {"lazyfree"}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
test "FLUSHDB ASYNC can reclaim memory in background" {
|
test "FLUSHDB ASYNC can reclaim memory in background" {
|
||||||
|
# make the previous test is really done before sampling used_memory
|
||||||
|
wait_for_condition 50 100 {
|
||||||
|
[s lazyfree_pending_objects] == 0
|
||||||
|
} else {
|
||||||
|
fail "lazyfree isn't done"
|
||||||
|
}
|
||||||
|
|
||||||
set orig_mem [s used_memory]
|
set orig_mem [s used_memory]
|
||||||
set args {}
|
set args {}
|
||||||
for {set i 0} {$i < 100000} {incr i} {
|
for {set i 0} {$i < 100000} {incr i} {
|
||||||
|
Loading…
Reference in New Issue
Block a user