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

Detect a memory leak as a test failure #8

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

komainu8
Copy link
Member

@komainu8 komainu8 commented Feb 2, 2023

Normally, grntest detect a memory leak as a test failure. However, grntest may return success even if grntest detect memory leak if we specify the --n-retries option.
Because grntest return success when a test successful even once while retry test.

I modification that grntest return false when a test fail cause of memory leak even once in this PR.

Normally, grntest detect a memory leak as a test failure.
However, grntest may return success even if grntest detect memory leak
if we specify the --n-retries option.
Because grntest return success when a test successful even once while
retry test.

I modification that grntest return false when a test fail cause of
memory leak even once in this PR.
@@ -181,6 +185,7 @@ def run_test(test_script_path, test_name)

runner = TestRunner.new(@tester, self)
return true if runner.run
return false if @result.n_leaked_tests > 0
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need this?
It seems that TestRunner#run returns false when leaked test exists: https://github.com/groonga/grntest/blob/master/lib/grntest/test-runner.rb#L111

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants