moto/tests/terraformtests/etc/0007-Comprehend-Reduce-wait-times.patch
2023-08-21 20:33:16 +00:00

52 lines
2.1 KiB
Diff

From 44aeb35bb1747acd7fcae1b53186a37eee61c93d Mon Sep 17 00:00:00 2001
From: Bert Blommers <info@bertblommers.nl>
Date: Sun, 13 Aug 2023 20:53:38 +0000
Subject: [PATCH] Patch: Comprehend timings
---
internal/service/comprehend/common_model.go | 2 +-
internal/service/comprehend/consts.go | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/internal/service/comprehend/common_model.go b/internal/service/comprehend/common_model.go
index b9af8e5f4c..bda7b84d90 100644
--- a/internal/service/comprehend/common_model.go
+++ b/internal/service/comprehend/common_model.go
@@ -60,7 +60,7 @@ func waitNetworkInterfaceCreated(ctx context.Context, conn *ec2.EC2, initialENII
Pending: []string{},
Target: []string{ec2.NetworkInterfaceStatusInUse},
Refresh: statusNetworkInterfaces(ctx, conn, initialENIIds, securityGroups, subnets),
- Delay: 4 * time.Minute,
+ Delay: 4 * time.Second,
MinTimeout: 10 * time.Second,
Timeout: timeout,
}
diff --git a/internal/service/comprehend/consts.go b/internal/service/comprehend/consts.go
index e57884a12d..8fc23d7018 100644
--- a/internal/service/comprehend/consts.go
+++ b/internal/service/comprehend/consts.go
@@ -4,15 +4,15 @@ import (
"time"
)
-const iamPropagationTimeout = 2 * time.Minute
+const iamPropagationTimeout = 2 * time.Second
// Avoid service throttling
-const entityRegcognizerCreatedDelay = 10 * time.Minute
+const entityRegcognizerCreatedDelay = 10 * time.Second
const entityRegcognizerStoppedDelay = 0
-const entityRegcognizerDeletedDelay = 5 * time.Minute
-const entityRegcognizerPollInterval = 1 * time.Minute
+const entityRegcognizerDeletedDelay = 5 * time.Second
+const entityRegcognizerPollInterval = 1 * time.Second
-const documentClassifierCreatedDelay = 15 * time.Minute
+const documentClassifierCreatedDelay = 15 * time.Second
const documentClassifierStoppedDelay = 0
-const documentClassifierDeletedDelay = 5 * time.Minute
-const documentClassifierPollInterval = 1 * time.Minute
+const documentClassifierDeletedDelay = 5 * time.Second
+const documentClassifierPollInterval = 1 * time.Second
--
2.25.1