From 1ffd1ff9a6b858a1b4bc53eb75cb685d2425f33c Mon Sep 17 00:00:00 2001 From: Aaron Lehmann Date: Mon, 12 Jun 2017 17:36:54 -0700 Subject: [PATCH] Skip TestUpdaterRollbackAndPauseNoMonitor This test triggers a race condition in the way the updater and restart supervisor interact. The problem is normally masked by a second reconciliation pass triggered as a side effect of the update completing, but this test case does not wait long enough for the update to be declared complete. Since the test does not pass reliably, it should be skipped until the underlying issue is fixed. Signed-off-by: Aaron Lehmann --- .../orchestrator/replicated/update_test.go | 29 ++----------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/manager/orchestrator/replicated/update_test.go b/manager/orchestrator/replicated/update_test.go index b5aa6798d4..b672d65b36 100644 --- a/manager/orchestrator/replicated/update_test.go +++ b/manager/orchestrator/replicated/update_test.go @@ -1,7 +1,6 @@ package replicated import ( - "fmt" "sync/atomic" "testing" "time" @@ -21,6 +20,7 @@ func TestUpdaterRollbackAndPause(t *testing.T) { } func TestUpdaterRollbackAndPauseNoMonitor(t *testing.T) { + t.Skip("skipping - see #2137") testUpdaterRollback(t, api.UpdateConfig_PAUSE, false) } @@ -185,32 +185,7 @@ func testUpdaterRollback(t *testing.T, rollbackFailureAction api.UpdateConfig_Fa assert.Equal(t, observedTask.Status.State, api.TaskStateNew) assert.Equal(t, observedTask.Spec.GetContainer().Image, "image2") - // FIXME(aaronl): Once intermittent failure is resolved, replace the - // following loop with: - //observedTask = testutils.WatchTaskCreate(t, watchCreate) -loop: - for { - select { - case event := <-watchCreate: - if task, ok := event.(api.EventCreateTask); ok { - observedTask = task.Task - break loop - } - if _, ok := event.(api.EventUpdateTask); ok { - assert.FailNow(t, "got EventUpdateTask when expecting EventCreateTask", fmt.Sprint(event)) - } - case <-time.After(time.Second): - s.View(func(tx store.ReadTx) { - service := store.GetService(tx, "id1") - fmt.Printf("service: %+v\n", service) - tasks, _ := store.FindTasks(tx, store.All) - for i, task := range tasks { - fmt.Printf("task %d: %+v\n", i, task) - } - }) - assert.FailNow(t, "no task creation") - } - } + observedTask = testutils.WatchTaskCreate(t, watchCreate) assert.Equal(t, observedTask.Status.State, api.TaskStateNew) assert.Equal(t, observedTask.Spec.GetContainer().Image, "image2")