This repository was archived by the owner on Jan 30, 2020. It is now read-only.
Commit 4b877a1
Dongsu Park
functional: sleep shortly to avoid errors in TestScheduleOneWayConflict
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.1 parent def63c9 commit 4b877a1
1 file changed
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
284 | 285 | | |
285 | 286 | | |
286 | 287 | | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
287 | 297 | | |
288 | 298 | | |
289 | 299 | | |
| |||
0 commit comments