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 rerun_filter for ignore_next_measurement_file #9963

Merged
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions ocs_ci/utility/workloadfixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,20 @@ def measure_operation(
return results


def ignore_next_measurement_file():
def ignore_next_measurement_file(err, name, test, plugin):
"""
Sets config.RUN["ignore_next_measurement_file"] to True. This is supposed
to be used in monitoring tests that are marked as @flaky to make sure that
the measurement is done again.
"""

Reference to the description of flaky rerun_filter function:
https://github.com/box/flaky/blob/d29ca76d5a72845428a0716c74f8fa0d40d98532/flaky/flaky_decorator.py#L16

Args:
err (tuple): Information about the test failure (from sys.exc_info())
name (str): The test name
test (function): The test that has raised an error
plugin (function): The flaky plugin.
"""
config.RUN["ignore_next_measurement_file"] = True
return True
Loading