Allow for wait in _restore_password

The _restore_password method within the
test_user_update_own_password() tests attempts to authenticate right
after changing a password. This patch makes it so that we wait one
second before attempt the authentication call, similar to the pattern
already established in the pre-existing test.

Change-Id: Ia51f28a70ae099f1ec93851d271db8556aced836
This commit is contained in:
Lance Bragstad 2016-09-08 19:37:12 +00:00
parent 53015677cd
commit 0d8f00f2df
2 changed files with 10 additions and 0 deletions

View File

@ -44,6 +44,11 @@ class IdentityUsersTest(base.BaseIdentityV2Test):
# Clear auth restores the original credentials and deletes
# cached auth data
client.auth_provider.clear_auth()
# NOTE(lbragstad): Fernet tokens are not subsecond aware and
# Keystone should only be precise to the second. Sleep to ensure we
# are passing the second boundary before attempting to
# authenticate.
time.sleep(1)
client.auth_provider.set_auth()
old_pass = self.creds.password

View File

@ -44,6 +44,11 @@ class IdentityV3UsersTest(base.BaseIdentityV3Test):
# Clear auth restores the original credentials and deletes
# cached auth data
client.auth_provider.clear_auth()
# NOTE(lbragstad): Fernet tokens are not subsecond aware and
# Keystone should only be precise to the second. Sleep to ensure we
# are passing the second boundary before attempting to
# authenticate.
time.sleep(1)
client.auth_provider.set_auth()
old_pass = self.creds.password