From b5c01f56f30ca3e954c4a53011ef5aceb5b897bb Mon Sep 17 00:00:00 2001 From: Douglas Bagnall Date: Mon, 14 Jun 2021 23:41:07 +1200 Subject: [PATCH] pytest: dns_aging: try queries of recently tombstoned nodes Windows fails this one. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- python/samba/tests/dns_aging.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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