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 sporadic test failing with OOM #4053

Merged
merged 4 commits into from
Jan 15, 2025
Merged

Conversation

ggivo
Copy link
Contributor

@ggivo ggivo commented Jan 15, 2025

Missing AuthXManager shutdown in tests causes the token renew thread to run after the test completion.
When used with Mockito.mock() this leads to a growing number of mocked objects and eventually to OOM.

  • Invoke AuthXManager.close()
  • Updated GitHub test workflow to publish heap dump on OOM errors in the test

Troubleshooting flaky test failing with OOM
@ggivo ggivo requested review from atakavci and sazzad16 January 15, 2025 08:30
Copy link
Contributor

@sazzad16 sazzad16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All these .close(); and .stop(); will still be missed if there are errors; i.e. assertion failures before them.
These should be put in reasonable finally block. try-with-resources can also be considered if possible.

@ggivo ggivo merged commit 27ecd6c into redis:master Jan 15, 2025
8 checks passed
@ggivo ggivo deleted the troubleshoot-test-oom branch January 31, 2025 16:38
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.

2 participants