diff --git a/tests/integration/deploy/test_deploy_command.py b/tests/integration/deploy/test_deploy_command.py index 19d3bdd342..64a27a17a7 100644 --- a/tests/integration/deploy/test_deploy_command.py +++ b/tests/integration/deploy/test_deploy_command.py @@ -1,6 +1,7 @@ import os import tempfile import uuid +import time from subprocess import Popen, PIPE from unittest import skipIf @@ -16,6 +17,7 @@ # Deploy tests require credentials and CI/CD will only add credentials to the env if the PR is from the same repo. # This is to restrict package tests to run outside of CI/CD and when the branch is not master. SKIP_DEPLOY_TESTS = RUNNING_ON_CI and RUNNING_TEST_FOR_MASTER_ON_CI +CFN_SLEEP = 3 @skipIf(SKIP_DEPLOY_TESTS, "Skip deploy tests in CI/CD only") @@ -24,6 +26,7 @@ def setUp(self): self.cf_client = boto3.client("cloudformation") self.sns_arn = os.environ.get("AWS_SNS") self.stack_names = [] + time.sleep(CFN_SLEEP) super(TestDeploy, self).setUp() def tearDown(self): diff --git a/tests/regression/deploy/test_deploy_regression.py b/tests/regression/deploy/test_deploy_regression.py index 9a6fac4134..728b816ac0 100644 --- a/tests/regression/deploy/test_deploy_regression.py +++ b/tests/regression/deploy/test_deploy_regression.py @@ -1,6 +1,7 @@ import os import tempfile import uuid +import time from subprocess import Popen, PIPE from unittest import skipIf @@ -14,7 +15,7 @@ # Package Regression tests require credentials and CI/CD will only add credentials to the env if the PR is from the same repo. # This is to restrict package tests to run outside of CI/CD and when the branch is not master. SKIP_DEPLOY_REGRESSION_TESTS = RUNNING_ON_CI and RUNNING_TEST_FOR_MASTER_ON_CI - +CFN_SLEEP = 3 # Only testing return codes to be equivalent @@ -25,6 +26,7 @@ def setUp(self): self.kms_key = os.environ.get("AWS_KMS_KEY") self.stack_names = [] self.cf_client = boto3.client("cloudformation") + time.sleep(CFN_SLEEP) super(TestDeployRegression, self).setUp() def tearDown(self):