Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test TestGetTaskByArn and TestMetadataFileUpdatedAgentRestart #1030

Merged
merged 1 commit into from
Oct 26, 2017

Conversation

richardpen
Copy link

@richardpen richardpen commented Oct 23, 2017

Summary

Fix #1020 #1028

Implementation details

For TestGetTaskByArn, set the task desired status to be stopped, so there won't be any docker api call.

For TestMetadataFileUpdatedAgentRestart set the container status to running, so no pull/create/start call to docker, and added expect for ForceSave.

Testing

  • Builds on Linux (make release)
  • Builds on Windows (go build -out amazon-ecs-agent.exe ./agent)
  • Unit tests on Linux (make test) pass
  • Unit tests on Windows (go test -timeout=25s ./agent/...) pass
  • Integration tests on Linux (make run-integ-tests) pass
  • Integration tests on Windows (.\scripts\run-integ-tests.ps1) pass
  • Functional tests on Linux (make run-functional-tests) pass
  • Functional tests on Windows (.\scripts\run-functional-tests.ps1) pass

New tests cover the changes:

Description for the changelog

Licensing

This contribution is under the terms of the Apache 2.0 License:

Copy link
Contributor

@samuelkarp samuelkarp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM once tests pass

@aaithal
Copy link
Contributor

aaithal commented Oct 24, 2017

Can you please edit your commit message to be more on the lines of what was discussed here?

TestGetTaskByArn and TestMetadataFileUpdatedAgentRestart sometimes can
be flaky due to missing docker api call, as there is no way to stop the
engine from procssing the task. By modifying the desired/known status of
the container/task to reduce this calls.
@samuelkarp samuelkarp added this to the 1.15.0 milestone Oct 26, 2017
@richardpen richardpen merged commit ad5b70b into aws:dev Oct 26, 2017
@richardpen richardpen deleted the fix-test branch November 21, 2017 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants