Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Stop docker containers on run_test failure/error - #4585

Merged
NateBrady23 merged 3 commits into
TechEmpower:masterfrom
NateBrady23:stop-tests-error
Mar 28, 2019
Merged

NateBrady23 merged 3 commits into
TechEmpower:masterfrom
NateBrady23:stop-tests-error

Conversation

@NateBrady23

Copy link
Copy Markdown
Member

Make sure all server and database containers are stopped when a test fails; whether it's a normal failure or an error that bubbled up from the toolset.

@michaelhixson

Copy link
Copy Markdown
Contributor

I still suggest using a finally block instead. Then it's really easy to see that the containers always get stopped. The way it is in this PR now, we are stopping the containers one way if success and another if failure, and you have to think about whether __exit_test is always called and with what success value. It seems more brittle than it could be.

@msmith-techempower

Copy link
Copy Markdown
Member

A net loss in lines of code: always good for a project.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants