Fix time issue in AccessInfo test
I've only seen this happen once, however by making the token expiry 5 minutes in the future, then checking that it wont have expired in 300 seconds means that if the test happens all on the same second boundary then the test will fail. Just increase the time we're checking for by a second to ensure it doesn't happen. Change-Id: Iadeadfbacaf6f1b939c237919b52445c60c9bdd0
This commit is contained in:
@@ -76,7 +76,7 @@ class AccessInfoTest(utils.TestCase):
|
||||
auth_ref = access.AccessInfo.factory(resp=TOKEN_RESPONSE,
|
||||
body=UNSCOPED_TOKEN)
|
||||
self.assertFalse(auth_ref.will_expire_soon(stale_duration=120))
|
||||
self.assertTrue(auth_ref.will_expire_soon(stale_duration=300))
|
||||
self.assertTrue(auth_ref.will_expire_soon(stale_duration=301))
|
||||
self.assertFalse(auth_ref.will_expire_soon())
|
||||
|
||||
def test_building_domain_scoped_accessinfo(self):
|
||||
|
Reference in New Issue
Block a user