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 test batch container happy path unit test #703

Merged
merged 2 commits into from
Feb 9, 2017

Conversation

aaithal
Copy link
Contributor

@aaithal aaithal commented Feb 9, 2017

Summary

Modifies the test batch container happy path unit test to be less flaky

Implementation details

  • I've added an explicit wait group dependency for the steady state check to kick-off to ensure that
    DecribeContainer is invoked at-least once.
  • I've also refactored tests in the the docker_task_engine_test.go file to use assert()s wherever possible.

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: N/A

Description for the changelog

None

Licensing

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

This should hopefully remove the flakiness reported in aws#662
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.

👍 💯

@aaithal aaithal merged commit 89930da into aws:dev Feb 9, 2017
jwerak pushed a commit to appuri/amazon-ecs-agent that referenced this pull request Jun 8, 2017
* Force steady state check in TestBatchContainerHappyPath.

This should hopefully remove the flakiness reported in aws#662

* Refactor task engine tests to use testify and to extract the common createDockerEvent into a function of its own
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.

2 participants