]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Turn off deadline for wildcard tests
authorMichal Nowak <mnowak@isc.org>
Wed, 7 Aug 2024 18:53:00 +0000 (20:53 +0200)
committerMichal Nowak <mnowak@isc.org>
Thu, 12 Sep 2024 09:42:22 +0000 (11:42 +0200)
Tests that query BIND need much longer deadline to account for retries,
the default 200ms won't work.

bin/tests/system/wildcard/tests_wildcard.py

index cc5c1571a2e754a09b044a0b189a7fa8c095d7f4..71a84e567f11bc34498646db663b82e2328e03b7 100755 (executable)
@@ -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),