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

TestPromtail: avoid hanging when test fails midway #5837

Merged
merged 2 commits into from
Apr 8, 2022

Conversation

bboreham
Copy link
Contributor

@bboreham bboreham commented Apr 8, 2022

What this PR does / why we need it:
Check if the test has already failed before waiting for everything to exit.

Also call Shutdown() via defer so we clean up those resources when the test fails.

Which issue(s) this PR fixes:
Fixes #5836

Special notes for your reviewer:

Checklist

  • NA Documentation added
  • Tests updated
  • NA Add an entry in the CHANGELOG.md about the changes.

bboreham added 2 commits April 8, 2022 12:57
I want to do this in a test
Also call Shutdown via defer so we clean up those resources when the test fails
@bboreham bboreham requested a review from a team as a code owner April 8, 2022 13:00
@owen-d owen-d merged commit 1329ea1 into main Apr 8, 2022
@owen-d owen-d deleted the testpromtail-avoid-hang branch April 8, 2022 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TestPromtail unit test hangs on timeout
2 participants