From: Douglas Bagnall Date: Mon, 14 Jun 2021 11:41:07 +0000 (+1200) Subject: pytest: dns_aging: try queries of recently tombstoned nodes X-Git-Tag: tevent-0.11.0~304 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=b5c01f56f30ca3e954c4a53011ef5aceb5b897bb;p=thirdparty%2Fsamba.git pytest: dns_aging: try queries of recently tombstoned nodes Windows fails this one. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py index df1ea026393..5a6c7346d5f 100644 --- a/python/samba/tests/dns_aging.py +++ b/python/samba/tests/dns_aging.py @@ -1970,6 +1970,22 @@ class TestDNSAging(DNSTest): elif d == txt3: self.assertNotEqual(r.dwTimeStamp, 0) + def test_dns_query_for_tombstoned_results(self): + # This one fails on Windows, because the dns cache holds B + # after it has been tombstoned behind its back. + A = 'a' + B = 'b' + self.dns_tombstone(A) + self.assert_tombstoned(A) + r = self.dns_query(A, qtype=dns.DNS_QTYPE_TXT) + self.assertEqual(r.ancount, 0) + + self.dns_update_record(B, B) + self.dns_tombstone(B) + self.assert_tombstoned(B) + r = self.dns_query(B, qtype=dns.DNS_QTYPE_TXT) + self.assertEqual(r.ancount, 0) + def test_basic_scavenging(self): # NOTE: This one fails on Windows, because the RPC call to # prompt scavenging is not immediate. On Samba, in the