Skip to content
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 into
coreos:masterfrom
endocode:dongsu/sleep-after-destroy-fxtests
Jun 17, 2016
Merged

functional: sleep shortly to avoid errors in TestScheduleOneWayConflict#1606
dongsupark merged 1 commit into
coreos:masterfrom
endocode:dongsu/sleep-after-destroy-fxtests

Conversation

@dongsupark
Copy link
Copy Markdown

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.

@dongsupark dongsupark self-assigned this Jun 15, 2016
@dongsupark dongsupark force-pushed the dongsu/sleep-after-destroy-fxtests branch from 8df6000 to 4e2b941 Compare June 15, 2016 15:00
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.
@dongsupark dongsupark force-pushed the dongsu/sleep-after-destroy-fxtests branch from 4e2b941 to 4b877a1 Compare June 15, 2016 17:25
@dongsupark
Copy link
Copy Markdown
Author

Unless anyone has a better idea, I'll merge it tomorrow.

@dongsupark dongsupark merged commit e860c59 into coreos:master Jun 17, 2016
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
@dongsupark dongsupark deleted the dongsu/sleep-after-destroy-fxtests branch June 17, 2016 08:35
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant