Skip to content

Commit

Permalink
Fix rerun_filter for ignore_next_measurement_file
Browse files Browse the repository at this point in the history
Signed-off-by: fbalak <[email protected]>
  • Loading branch information
fbalak committed Jun 19, 2024
1 parent 0b25e07 commit 8dd4c92
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion ocs_ci/utility/workloadfixture.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,25 @@ 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` of `class`, :class:`Exception`, `traceback`):
Information about the test failure (from sys.exc_info())
name (`unicode`):
The test name
test (:class:`Function`):
The test that has raised an error
plugin (:class:`FlakyPytestPlugin`):
The flaky plugin. Has a :prop:`stream` that can be written to in
order to add to the Flaky Report.
"""
config.RUN["ignore_next_measurement_file"] = True
return True

0 comments on commit 8dd4c92

Please sign in to comment.