This repository was archived by the owner on Jan 30, 2020. It is now read-only.
functional: sleep shortly to avoid errors in TestScheduleOneWayConflict#1606
Merged
dongsupark merged 1 commit intoJun 17, 2016
Merged
Conversation
8df6000 to
4e2b941
Compare
In TestScheduleOneWayConflict, after destroying conflicts-with-hello.service, we need to sleep shortly to avoid occasional errors of conflicts-with-hello.service being rescheduled even after being destroyed. In that case, the conflicts unit remains active, while the original hello.service remains inactive. Then the test TestScheduleOneWayConflict fails at the end with a message "Incorrect unit started". This error seems to occur frequently when enable_grpc turned on. This sleep is just a workaround. We should find out the long-term solution. Also note that, before commit 8cfc189 ("Functional tests: Fix race condition in TestScheduleOneWayConflict()"), this error didn't occur, because there was already a sleep for 5 seconds in place. However, the commit 8cfc189 tried to fix a race using util.WaitForState(), also by removing the original sleep. Actually the commit didn't completely fix the race, so the hidden bug started to reappear.
4e2b941 to
4b877a1
Compare
Author
|
Unless anyone has a better idea, I'll merge it tomorrow. |
dongsupark
pushed a commit
that referenced
this pull request
Jun 17, 2016
…ests functional: sleep shortly to avoid errors in TestScheduleOneWayConflict
dongsupark
pushed a commit
that referenced
this pull request
Jun 17, 2016
…ests functional: sleep shortly to avoid errors in TestScheduleOneWayConflict
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In TestScheduleOneWayConflict, after destroying conflicts-with-hello.service, we need to sleep shortly to avoid occasional errors of conflicts-with-hello.service being rescheduled even after being destroyed. In that case, the conflicts unit remains active, while the original
hello.service remains inactive. Then the test TestScheduleOneWayConflict fails at the end with a message "Incorrect unit started". This error seems to occur frequently when enable_grpc turned on.
This sleep is just a workaround. We should find out the long-term solution.
Also note that, before commit 8cfc189 ("Functional tests: Fix race condition in TestScheduleOneWayConflict()"), this error didn't occur, because there was already a sleep for 5 seconds in place. However, the commit 8cfc189 tried to fix a race using util.WaitForState(), also by removing the original sleep. Actually the commit didn't completely fix the race, so the hidden bug started to reappear.