From 8c0c0350e474266fc2f347f772f87fb1292ad15a Mon Sep 17 00:00:00 2001 From: Theofilos Manitaras Date: Wed, 6 Apr 2022 17:09:39 +0200 Subject: [PATCH] Add pytest-rerunfailures to requirements and mark flaky tests --- requirements.txt | 1 + unittests/test_schedulers.py | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements.txt b/requirements.txt index f19f5f24c1..a7eb49896a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,6 +8,7 @@ lxml==4.8.0 pytest==7.0.1 pytest-forked==1.4.0 pytest-parallel==0.1.1 +pytest-rerunfailures==10.2 PyYAML==6.0 requests==2.27.1 semver==2.13.0 diff --git a/unittests/test_schedulers.py b/unittests/test_schedulers.py index a5b1ae161e..70a45b2c29 100644 --- a/unittests/test_schedulers.py +++ b/unittests/test_schedulers.py @@ -658,6 +658,7 @@ def test_cancel_with_grace(minimal_job, scheduler, local_only): assert_process_died(sleep_pid) +@pytest.mark.flaky(reruns=3) def test_cancel_term_ignore(minimal_job, scheduler, local_only): # This test emulates a descendant process of the spawned job that # ignores the SIGTERM signal: