1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

pytest: dns_aging: try queries of recently tombstoned nodes

Windows fails this one.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
Douglas Bagnall 2021-06-14 23:41:07 +12:00 committed by Andrew Bartlett
parent a7c0a17c48
commit b5c01f56f3

View File

@ -1970,6 +1970,22 @@ class TestDNSAging(DNSTest):
elif d == txt3: elif d == txt3:
self.assertNotEqual(r.dwTimeStamp, 0) 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): def test_basic_scavenging(self):
# NOTE: This one fails on Windows, because the RPC call to # NOTE: This one fails on Windows, because the RPC call to
# prompt scavenging is not immediate. On Samba, in the # prompt scavenging is not immediate. On Samba, in the