Expose failures to clean up after tests #342
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When stack objects aren't deleted after tests, it can mean
Previously, all stacks in the namespace were deleted as part of a top-level
AfterEach
; but because this tried to delete all stacks and wait until they'd been finalised, any rogue test case that didn't clean up properly and couldn't be finalised would cause some other test to time out.The first commit here uses a similar idea, but fails the test suite if there are stacks left over at the very end. This highlighted a few problems, which I've also fixed here:
Deleting a stack but not waiting for it to be finalized, within a test, could mean other tests were "contaminated" (usually only meaning they might take a bit longer, and get cross-talk in the logs, but still). I've made all test cases use a helper which waits for the finalizers to have run.