Skip to content

Commit

Permalink
fix flaky TestHandleEBSAckTimeout test for windows (#3904)
Browse files Browse the repository at this point in the history
  • Loading branch information
mye956 authored Sep 20, 2023
1 parent e317379 commit 19c3a32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agent/ebs/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func TestHandleEBSAckTimeout(t *testing.T) {
apiebs.VolumeIdName: volumeID,
}

expiresAt := time.Now().Add(time.Millisecond * 5)
expiresAt := time.Now().Add(time.Millisecond * testconst.WaitTimeoutMillis)
ebsAttachment := &apiebs.ResourceAttachment{
AttachmentInfo: attachmentinfo.AttachmentInfo{
TaskARN: taskARN,
Expand All @@ -311,7 +311,7 @@ func TestHandleEBSAckTimeout(t *testing.T) {
watcher := newTestEBSWatcher(ctx, taskEngineState, eventChannel, mockDiscoveryClient)

watcher.HandleResourceAttachment(ebsAttachment)
time.Sleep(10 * time.Millisecond)
time.Sleep(time.Millisecond * testconst.WaitTimeoutMillis * 2)
assert.Len(t, taskEngineState.(*dockerstate.DockerTaskEngineState).GetAllEBSAttachments(), 0)
ebsAttachment, ok := taskEngineState.(*dockerstate.DockerTaskEngineState).GetEBSByVolumeId(volumeID)
assert.False(t, ok)
Expand Down

0 comments on commit 19c3a32

Please sign in to comment.