From 932e6d551068b0a1956d0d8dd6af85513bb96587 Mon Sep 17 00:00:00 2001 From: Jamie Lennox Date: Wed, 11 Mar 2015 05:32:33 +1100 Subject: [PATCH] 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 --- keystoneclient/tests/unit/v3/test_access.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keystoneclient/tests/unit/v3/test_access.py b/keystoneclient/tests/unit/v3/test_access.py index d3107af4a..5e4a9493d 100644 --- a/keystoneclient/tests/unit/v3/test_access.py +++ b/keystoneclient/tests/unit/v3/test_access.py @@ -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):