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

Refactor TestMemoryManager.testOutOfMemoryKiller #11818

Merged

Conversation

findepi
Copy link
Member

@findepi findepi commented Apr 6, 2022

This probably doesn't fix the #11016

maybe fixes #11016

@findepi findepi added test no-release-notes This pull request does not require release notes entry labels Apr 6, 2022
@findepi findepi requested review from losipiuk, sopel39 and hashhar April 6, 2022 08:27
@cla-bot cla-bot bot added the cla-signed label Apr 6, 2022
Copy link
Member

@losipiuk losipiuk left a comment

Choose a reason for hiding this comment

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

thx

findepi added 2 commits April 6, 2022 11:01
If one query finishes successfully, give another query a chance to fail.
`assertNotNull` is redundant since we also do `assertEquals`.
@findepi findepi force-pushed the findepi/improve-testOutOfMemoryKiller branch from 22cc8e3 to f041992 Compare April 6, 2022 09:03
findepi added 2 commits April 6, 2022 11:05
It was observed on CI that test query may complete successfully. This
may be because OOM killer has 5s minimal delay.
Within the test, one query should get killed, but the other may not be
killed and run to completion. If the first submitted query happens to
run successfully, the test takes longer to complete.

Inspect queries in order of their completion, not submission.
@sopel39 sopel39 removed their request for review April 6, 2022 09:08
@findepi findepi force-pushed the findepi/improve-testOutOfMemoryKiller branch from f041992 to 8eca03d Compare April 6, 2022 09:09
@findepi
Copy link
Member Author

findepi commented Apr 6, 2022

@losipiuk thanks for review.

i added Slow down test query in testOutOfMemoryKiller commit, so now it should fix the referenced issue.
I couldn't repro the problem locally, so don't know for sure. Let's give it a try.
PTAL

@findepi findepi requested a review from losipiuk April 6, 2022 09:09
@@ -115,6 +116,12 @@ public void testOutOfMemoryKiller()
.buildOrThrow();

try (DistributedQueryRunner queryRunner = createQueryRunner(TINY_SESSION, properties)) {
queryRunner.installPlugin(new BlackHolePlugin());
Copy link
Member

Choose a reason for hiding this comment

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

This may be because OOM killer has 5s minimal delay
This will be dropped (as does not play well with task-level retries. (part of #11800).

Copy link
Member Author

Choose a reason for hiding this comment

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

Will the test be updated to use smaller delay? This could make the test run shorter.

Still, the change here should remain. If query can succeed in low number of seconds, this feels racy.

@findepi findepi merged commit e4571d7 into trinodb:master Apr 6, 2022
@findepi findepi deleted the findepi/improve-testOutOfMemoryKiller branch April 6, 2022 15:14
@github-actions github-actions bot added this to the 376 milestone Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed no-release-notes This pull request does not require release notes entry test
Development

Successfully merging this pull request may close these issues.

Flaky test TestMemoryManager.testOutOfMemoryKiller
2 participants