Skip to content

Commit

Permalink
Running TestHandleEBSAckTimeout multiple times after bumping up sleep…
Browse files Browse the repository at this point in the history
… timer
  • Loading branch information
mye956 committed Sep 13, 2023
1 parent 21bd233 commit e7be39a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,10 @@ jobs:
run: |
$Env:GOPATH = "$Env:GITHUB_WORKSPACE"
cd "$Env:GITHUB_WORKSPACE"
cd "src/github.com/aws/amazon-ecs-agent/agent"
cd "src/github.com/aws/amazon-ecs-agent/agent/ebs"
gcc --version
$env:ZZZ_SKIP_WINDOWS_SERVER_VERSION_CHECK_NOT_SUPPORTED_IN_PRODUCTION = 'true'
$packages=go list .\... | Where-Object {$_ -NotMatch 'vendor'}
go test -v -tags unit -timeout=120s $packages
go test -v -tags unit -run TestHandleEBSAckTimeout -count 100
- name: run ecs-agent tests
working-directory:
run: |
Expand Down
2 changes: 1 addition & 1 deletion agent/ebs/watcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func TestHandleEBSAckTimeout(t *testing.T) {
watcher := newTestEBSWatcher(ctx, taskEngineState, eventChannel, mockDiscoveryClient)

watcher.HandleResourceAttachment(ebsAttachment)
time.Sleep(10 * time.Millisecond)
time.Sleep(50 * time.Millisecond)
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 e7be39a

Please sign in to comment.