Skip to content
This repository was archived by the owner on Jan 30, 2020. It is now read-only.

Commit f139f14

Browse files
author
Dongsu Park
committed
Merge pull request #1606 from endocode/dongsu/sleep-after-destroy-fxtests
functional: sleep shortly to avoid errors in TestScheduleOneWayConflict
2 parents e1cbcf7 + 4b877a1 commit f139f14

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

functional/scheduling_test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import (
2121
"path/filepath"
2222
"strings"
2323
"testing"
24+
"time"
2425

2526
"github.com/coreos/fleet/functional/platform"
2627
"github.com/coreos/fleet/functional/util"
@@ -284,6 +285,15 @@ func TestScheduleOneWayConflict(t *testing.T) {
284285
t.Fatalf("Failed destroying %s", name)
285286
}
286287

288+
// NOTE: we need to sleep here shortly to avoid occasional errors of
289+
// conflicts-with-hello.service being rescheduled even after being destroyed.
290+
// In that case, the conflicts unit remains active, while the original
291+
// hello.service remains inactive. Then the test TestScheduleOneWayConflict
292+
// fails at the end with a message "Incorrect unit started".
293+
// This error seems to occur frequently when enable_grpc turned on.
294+
// - dpark 20160615
295+
time.Sleep(1 * time.Second)
296+
287297
// Wait for the destroyed unit to actually disappear
288298
timeout, err := util.WaitForState(
289299
func() bool {

0 commit comments

Comments
 (0)