From ec2fc7680a4508c496c5817e4ba0d5c9c6475e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicki=20K=C5=99=C3=AD=C5=BEek?= Date: Mon, 12 Aug 2024 15:43:19 +0200 Subject: [PATCH] Allow rerun of unstable statschannel tests under TSAN The test_traffic_json and test_traffic_xml occasionally fail when running under TSAN. This happens in CI and is most likely a result of some instability that doesn't seem to be easily reproduced. --- bin/tests/system/isctest/mark.py | 4 ++++ bin/tests/system/statschannel/tests_json.py | 1 + bin/tests/system/statschannel/tests_xml.py | 1 + 3 files changed, 6 insertions(+) diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 0caac51af5..456586ac95 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -47,6 +47,10 @@ def is_dnsrps_available(): return True +def with_tsan(*args): # pylint: disable=unused-argument + return feature_test("--tsan") + + have_libxml2 = pytest.mark.skipif( not feature_test("--have-libxml2"), reason="libxml2 support disabled in the build" ) diff --git a/bin/tests/system/statschannel/tests_json.py b/bin/tests/system/statschannel/tests_json.py index 9b52541847..ef4696cdcf 100755 --- a/bin/tests/system/statschannel/tests_json.py +++ b/bin/tests/system/statschannel/tests_json.py @@ -100,5 +100,6 @@ def test_zone_with_many_keys_json(statsport): ) +@isctest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.with_tsan) def test_traffic_json(statsport): generic.test_traffic(fetch_traffic_json, statsip="10.53.0.2", statsport=statsport) diff --git a/bin/tests/system/statschannel/tests_xml.py b/bin/tests/system/statschannel/tests_xml.py index 81ac187587..93ba0bdb2f 100755 --- a/bin/tests/system/statschannel/tests_xml.py +++ b/bin/tests/system/statschannel/tests_xml.py @@ -130,5 +130,6 @@ def test_zone_with_many_keys_xml(statsport): ) +@isctest.mark.flaky(max_runs=2, rerun_filter=isctest.mark.with_tsan) def test_traffic_xml(statsport): generic.test_traffic(fetch_traffic_xml, statsip="10.53.0.2", statsport=statsport)