Skip to content

Commit

Permalink
engine: fix flakey TestRemoveEvents
Browse files Browse the repository at this point in the history
since we "Emit a couple of events for the task before cleanup finishes."
We should also add corresponding client.EXPECT().StopContainer()
  • Loading branch information
adnxn committed Jan 31, 2018
1 parent 0c65868 commit 7f1c65d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions agent/engine/docker_task_engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ func TestRemoveEvents(t *testing.T) {
eventStream <- createDockerEvent(api.ContainerStopped)
eventStream <- createDockerEvent(api.ContainerStopped)
}).Return(nil)

client.EXPECT().StopContainer(gomock.Any(), gomock.Any()).AnyTimes()
imageManager.EXPECT().RemoveContainerReferenceFromImageState(gomock.Any())

// This ensures that managedTask.waitForStopReported makes progress
Expand Down

0 comments on commit 7f1c65d

Please sign in to comment.