From 4211114c4b1e16b31583ea871bdcce466b4dc8bf Mon Sep 17 00:00:00 2001 From: Dave McCowan Date: Tue, 12 Sep 2017 10:00:08 -0600 Subject: [PATCH] Add extra time in functional test that fails intermittently The functional test that checks secret expiration fails intermittently because sometimes, when the gate is slow, the secret expires too quickly for the test. This patch adds an extra 10 seconds so the test will pass more consistently, while still maintaining the integrity of the test. Change-Id: I2f0df9b42dd2bf9dd600948164532fd31bb2a0d3 Closes-Bug: #1499673 --- functionaltests/api/v1/functional/test_secrets.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/functionaltests/api/v1/functional/test_secrets.py b/functionaltests/api/v1/functional/test_secrets.py index 6d23660b7..ff623e2d3 100644 --- a/functionaltests/api/v1/functional/test_secrets.py +++ b/functionaltests/api/v1/functional/test_secrets.py @@ -530,8 +530,8 @@ class SecretsTestCase(base.TestCase): a valid secret. """ - # create a secret that expires in 5 seconds - timestamp = utils.create_timestamp_w_tz_and_offset(seconds=5) + # create a secret that expires in 15 seconds + timestamp = utils.create_timestamp_w_tz_and_offset(seconds=15) test_model = secret_models.SecretModel( **self.default_secret_create_data) @@ -544,8 +544,8 @@ class SecretsTestCase(base.TestCase): get_resp = self.behaviors.get_secret_metadata(secret_ref) self.assertEqual(200, get_resp.status_code) - # now wait 10 seconds - time.sleep(10) + # now wait 20 seconds + time.sleep(20) # now get the secret - should be invalid (expired) resp = self.behaviors.get_secret_metadata(secret_ref)