From 98d1376212e19c00003b39a172f2fe7821ba5eb6 Mon Sep 17 00:00:00 2001 From: zhewang Date: Mon, 20 Jan 2025 09:48:08 +0800 Subject: [PATCH] OCM-13490 | test: Add wait time so that bastion instance status can be checked successfully. --- pkg/aws/aws_client/instance.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkg/aws/aws_client/instance.go b/pkg/aws/aws_client/instance.go index 38e285d..40308eb 100644 --- a/pkg/aws/aws_client/instance.go +++ b/pkg/aws/aws_client/instance.go @@ -37,6 +37,8 @@ func (client *AWSClient) LaunchInstance(subnetID string, imageID string, count i instanceIDs = append(instanceIDs, *instance.InstanceId) } log.LogInfo("Waiting for below instances ready: %s", strings.Join(instanceIDs, ",")) + // Wait 2 seconds for the asynchronous bastion instance to be created + time.Sleep(2 * time.Second) _, err = client.WaitForInstancesRunning(instanceIDs, 10) if err != nil { log.LogError("Error happened for instance running: %s", err)