Unverified Commit 46346e9e authored by sundb's avatar sundb Committed by GitHub
Browse files

Fix timing error oom-score-adj test (#8513)

fixes timing issue, fork didn't always get to set the oom score before the test verified it.
parent 303465af
...@@ -39,7 +39,12 @@ if {$system_name eq {linux}} { ...@@ -39,7 +39,12 @@ if {$system_name eq {linux}} {
r bgsave r bgsave
set child_pid [get_child_pid 0] set child_pid [get_child_pid 0]
assert_equal [get_oom_score_adj $child_pid] [expr $base + 30] # Wait until background child process to setOOMScoreAdj success.
wait_for_condition 100 10 {
[get_oom_score_adj $child_pid] == [expr $base + 30]
} else {
fail "Set oom-score-adj of background child process is not ok"
}
} }
# Failed oom-score-adj tests can only run unprivileged # Failed oom-score-adj tests can only run unprivileged
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment