From f10b3e64feab9c9ccc78c9820dc99a8b6b0971ec Mon Sep 17 00:00:00 2001 From: Rico Huijbers Date: Sat, 21 Dec 2019 02:51:09 +0100 Subject: [PATCH] fix: increase IAM wait timeout in integ test (#5504) Survive occasional latency spikes that exceed 1 minute. --- .../aws-cdk/test/integ/cli/test-cdk-deploy-with-role.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/aws-cdk/test/integ/cli/test-cdk-deploy-with-role.sh b/packages/aws-cdk/test/integ/cli/test-cdk-deploy-with-role.sh index 5e068f4eb4d81..892a4239aaf1a 100755 --- a/packages/aws-cdk/test/integ/cli/test-cdk-deploy-with-role.sh +++ b/packages/aws-cdk/test/integ/cli/test-cdk-deploy-with-role.sh @@ -42,15 +42,17 @@ aws iam put-role-policy \ }] }') -for i in $(seq 1 10); do +# 5 minutes +attempts=60 +for i in $(seq 1 $attempts); do if aws sts assume-role --role-arn ${role_arn} --role-session-name testing >/dev/null; then echo "Successfully assumed newly created role" break; - elif [ $i -lt 10 ]; then + elif [ $i -lt $attempts ]; then echo "Sleeping 5 seconds to improve chances of the role having propagated" sleep 5 else - echo "Failed to assume role after 10 attempts, exiting." + echo "Failed to assume role after $attempts attempts, exiting." exit 1 fi done