-
Notifications
You must be signed in to change notification settings - Fork 188
test: fix integration test which may cause case fail sometimes #2153
Conversation
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. Reviewer can indicate their review by submitting an approval review. |
Welcome @D3Hunter! |
Hi, thanks for your first contribution. Does this pr resolve the unstable test case If so, you can link them😊. |
jenkins 2161 is the case i met for adding |
@@ -32,7 +32,7 @@ function wait_pattern_exit() { | |||
pattern=$1 | |||
while true | |||
do | |||
if [ "pgrep -f $pattern" != "0" ]; then | |||
if ! pgrep -f $pattern >/dev/null 2>&1; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also fix the typo in L36 echo "pattern $pattern already exist"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems not a typo, it should be process with pattern $pattern already exit
…ail sometime; add sleep to all_mode test(may fail sometimes)
b9437ae
to
5d1b29a
Compare
/merge |
This pull request has been accepted and is ready to merge. Commit hash: 5d1b29a
|
In response to a cherrypick label: new pull request created: #2155. |
integration test: fix invalid pgrep expression which may cause case fail sometime; add sleep to all_mode test(may fail sometimes)
What problem does this PR solve?
some integration test case(all_mode) may fail sometimes(when process doesn't exit fast enough or delayed)
What is changed and how it works?
pgrep
expression inwait_pattern_exit
sleep 2
to integration test caseall_mode
Check List
Tests