tests/krb5: Make time assertion less strict
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 1 Sep 2021 07:15:17 +0000 (19:15 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Mon, 13 Sep 2021 23:11:35 +0000 (23:11 +0000)
This assertion could fail if there was a time difference between the KDC
and the client.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
python/samba/tests/krb5/raw_testcase.py

index 268f6ccc6bb5a46c71c88a0f6459b426a0220c76..5ae8fe4ba419fc299d49d7a718b9889536afba72 100644 (file)
@@ -2559,7 +2559,7 @@ class RawKerberosTest(TestCaseInTempDir):
                     current_time = time.time()
 
                     self.assertLess(current_time - 300, rep_time)
-                    self.assertLess(rep_time, current_time)
+                    self.assertLess(rep_time, current_time + 300)
 
         if all(etype not in client_as_etypes or etype not in proposed_etypes
                for etype in (kcrypto.Enctype.AES256,