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

Fixed some race conditions in task engine tests #673

Merged
merged 3 commits into from
Jan 25, 2017
Merged

Conversation

aaithal
Copy link
Contributor

@aaithal aaithal commented Jan 18, 2017

Summary

Fix event state race condition in task engine unit tests

Implementation details

I think this originated from copying test code from a unit test
that already had this bug because of the race condition. The deleted
line of code used to result in race condition and it would trigger
the task engine to do additional work after the test would complete
leading to test failures.

Should fix #669

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: No, but modified test code does.

Description for the changelog

None

Licensing

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

I think this originated from copying test code from a unit test
that already had this bug because of the race condition. The deleted
line of code used to result in race condition and it would trigger
the task engine to do additional work after the test would complete
leading to test failures.

Should fix aws#669
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 2e91fea into aws:dev Jan 25, 2017
jwerak pushed a commit to appuri/amazon-ecs-agent that referenced this pull request Jun 8, 2017
* Fix event state race condition in task engine unit tests.

I think this originated from copying test code from a unit test
that already had this bug because of the race condition. The deleted
line of code used to result in race condition and it would trigger
the task engine to do additional work after the test would complete
leading to test failures.

Should fix aws#669

* Vendor gomock with support for MinTimes

* Add documentation for using MinTimes in TestTaskTransitionWhenStopContainerReturnsUnretriableError test
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