From c8c8b36e4459a5d7fe61adb6b13e7af0490f84eb Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 7 Aug 2024 20:53:00 +0200 Subject: [PATCH] Turn off deadline for wildcard tests Tests that query BIND need much longer deadline to account for retries, the default 200ms won't work. (cherry picked from commit d2e0043ec3dd923922156f18736e6df3416f9ec7) --- bin/tests/system/wildcard/tests_wildcard.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bin/tests/system/wildcard/tests_wildcard.py b/bin/tests/system/wildcard/tests_wildcard.py index cc5c1571a2..71a84e567f 100755 --- a/bin/tests/system/wildcard/tests_wildcard.py +++ b/bin/tests/system/wildcard/tests_wildcard.py @@ -47,7 +47,7 @@ try: pytest.importorskip("hypothesis") except ValueError: pytest.importorskip("hypothesis", minversion="4.41.2") -from hypothesis import assume, example, given +from hypothesis import assume, example, given, settings from isctest.hypothesis.strategies import dns_names, dns_rdatatypes_without_meta import isctest.check @@ -63,6 +63,7 @@ IP_ADDR = "10.53.0.1" TIMEOUT = 5 # seconds, just a sanity check +@settings(deadline=None) @given(name=dns_names(suffix=SUFFIX), rdtype=dns_rdatatypes_without_meta) def test_wildcard_rdtype_mismatch( name: dns.name.Name, rdtype: dns.rdatatype.RdataType, named_port: int @@ -90,6 +91,7 @@ def test_wildcard_rdtype_mismatch( isctest.check.empty_answer(response_msg) +@settings(deadline=None) @given(name=dns_names(suffix=SUFFIX, min_labels=len(SUFFIX) + 1)) def test_wildcard_match(name: dns.name.Name, named_port: int) -> None: """Any label with maching rdtype must result in wildcard data in answer.""" @@ -116,6 +118,7 @@ def test_wildcard_match(name: dns.name.Name, named_port: int) -> None: # Force the `*.*.allwild.test.` corner case to be checked. +@settings(deadline=None) @example(name=isctest.name.prepend_label("*", isctest.name.prepend_label("*", SUFFIX))) @given( name=dns_names( @@ -138,6 +141,7 @@ NESTED_SUFFIX = dns.name.from_text("*.*.nestedwild.test.") # Force `*.*.*.nestedwild.test.` to be checked. +@settings(deadline=None) @example(name=isctest.name.prepend_label("*", NESTED_SUFFIX)) @given(name=dns_names(suffix=NESTED_SUFFIX, min_labels=len(NESTED_SUFFIX) + 1)) def test_name_in_between_wildcards(name: dns.name.Name, named_port: int) -> None: @@ -172,6 +176,7 @@ def test_name_in_between_wildcards(name: dns.name.Name, named_port: int) -> None assert response_msg.answer == expected_answer, str(response_msg) +@settings(deadline=None) @given( name=dns_names( suffix=isctest.name.prepend_label("*", NESTED_SUFFIX),