Skip to content

Commit

Permalink
incorporate PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonaj committed Nov 13, 2023
1 parent dbb5608 commit 84cc966
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 5 additions & 1 deletion internal/service/chime/find.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,13 @@ import (
"github.com/hashicorp/terraform-provider-aws/internal/tfresource"
)

const (
voiceConnectorResourcePropagationTimeout = 1 * time.Minute
)

func FindVoiceConnectorResourceWithRetry[T any](ctx context.Context, isNewResource bool, f func() (T, error)) (T, error) {
var resp T
err := tfresource.Retry(ctx, 1*time.Minute, func() *retry.RetryError {
err := tfresource.Retry(ctx, voiceConnectorResourcePropagationTimeout, func() *retry.RetryError {
var err error
resp, err = f()
if isNewResource && tfresource.NotFound(err) {
Expand Down
3 changes: 0 additions & 3 deletions internal/service/chime/voice_connector_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,6 @@ func testAccVoiceConnector_tags(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() {
acctest.PreCheck(ctx, t)
// Legacy chime resources are always created in us-east-1, and the ListTags operation
// can behave unexpectedly when configured with a different region.
// acctest.PreCheckRegion(t, endpoints.UsEast1RegionID)
testAccPreCheck(ctx, t)
},
ErrorCheck: acctest.ErrorCheck(t, chimesdkvoice.EndpointsID),
Expand Down

0 comments on commit 84cc966

Please sign in to comment.