From 0ff6d187a0b6f59939d0077b2877f082b5e75208 Mon Sep 17 00:00:00 2001 From: Wesley Pettit Date: Mon, 12 Jun 2023 15:46:31 -0700 Subject: [PATCH] load-test: refresh session for each waiter to prevent token expiration Signed-off-by: Wesley Pettit --- load_tests/load_test.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/load_tests/load_test.py b/load_tests/load_test.py index 46c3a660f..c16b84c0e 100644 --- a/load_tests/load_test.py +++ b/load_tests/load_test.py @@ -220,12 +220,12 @@ def run_ecs_tests(): # wait for tasks and validate for input_logger in INPUT_LOGGERS: # Wait until task stops and start validation - session = get_sts_boto_session() processes = [] - - client = session.client('ecs') - waiter = client.get_waiter('tasks_stopped') + for throughput in THROUGHPUT_LIST: + session = get_sts_boto_session() + client = session.client('ecs') + waiter = client.get_waiter('tasks_stopped') task_arn = names[f'{OUTPUT_PLUGIN}_{throughput}_task_arn'] waiter.wait( cluster=ecs_cluster_name,