summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2021-06-19 15:54:11 +1200
committerAndrew Bartlett <abartlet@samba.org>2021-06-22 01:14:37 +0000
commitad6637afa5e912f97dc21cb43f7893bd435c88b2 (patch)
tree5b2c829b662150b452546300022063dc08d09fbf /python
parent7fbb8f8e95786e7361e25ff647326b1f37911c2b (diff)
downloadsamba-ad6637afa5e912f97dc21cb43f7893bd435c88b2.tar.gz
pytest: dns_aging sibling test fails on windows
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
-rw-r--r--python/samba/tests/dns_aging.py15
1 files changed, 13 insertions, 2 deletions
diff --git a/python/samba/tests/dns_aging.py b/python/samba/tests/dns_aging.py
index 17ce1c0518d..b9efb694447 100644
--- a/python/samba/tests/dns_aging.py
+++ b/python/samba/tests/dns_aging.py
@@ -2663,8 +2663,19 @@ class TestDNSAging(DNSTest):
self.dns_update_record(name, B)
a_rec = self.get_unique_txt_record(name, A)
if not aging and touch:
- # this resets the timestamp even if it is a static record.
- self.assert_soon_after(a_rec, now)
+ # On Windows, this resets the timestamp even if it is a
+ # static record, though in that case it may be a
+ # transitory effect of the DNS cache. We will insist on
+ # the Samba behaviour of not changing (that is
+ # un-static-ing) a zero timestamp, because that is the
+ # sensible thing.
+ if a_days_ago == 0:
+ self.windows_variation(
+ self.assert_soon_after, a_rec, now,
+ msg="Windows resets static siblings (cache effect?)")
+ self.assert_timestamps_equal(a_rec, 0)
+ else:
+ self.assert_soon_after(a_rec, now)
else:
self.assert_timestamps_equal(a_rec, atime)