diff --git a/newrelic/resource_newrelic_key_transaction_test.go b/newrelic/resource_newrelic_key_transaction_test.go index 5b8cff7d3..27353c717 100644 --- a/newrelic/resource_newrelic_key_transaction_test.go +++ b/newrelic/resource_newrelic_key_transaction_test.go @@ -7,6 +7,7 @@ import ( "fmt" "regexp" "testing" + "time" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/acctest" "github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource" @@ -88,12 +89,16 @@ func testAccNewRelicCheckKeyTransactionExists(resourceName string) resource.Test client := testAccProvider.Meta().(*ProviderConfig).NewClient + time.Sleep(5 * time.Second) found, err := client.Entities.GetEntity(common.EntityGUID(rs.Primary.ID)) if err != nil { return fmt.Errorf(err.Error()) } - x := (*found).(*entities.KeyTransactionEntity) + x, foundOk := (*found).(*entities.KeyTransactionEntity) + if !foundOk { + return fmt.Errorf("no key transaction found") + } if x.GUID != common.EntityGUID(rs.Primary.ID) { return fmt.Errorf("key transaction not found") } diff --git a/newrelic/resource_newrelic_monitor_downtime_test.go b/newrelic/resource_newrelic_monitor_downtime_test.go index 7f86a5fca..c248dcdce 100644 --- a/newrelic/resource_newrelic_monitor_downtime_test.go +++ b/newrelic/resource_newrelic_monitor_downtime_test.go @@ -358,12 +358,12 @@ var fewValidTimeZones = []string{ // monitors with the below GUIDs belong to the v2 Integration Tests Account var monitorGUIDsAsString = convertStringListToString([]string{ - "MzgwNjUyNnxTWU5USHxNT05JVE9SfGFmZmM0MTRiLTVhNmMtNGI5NS1iMzYwLThhNmQ2ZTkzOTM3Yw", + "MzgwNjUyNnxTWU5USHxNT05JVE9SfDQ3ZWI5YmYzLWRiOTEtNDljYy04MzM2LTBhZWJhNTE5MzhiOQ", }) var monitorGUIDsUpdatedAsString = convertStringListToString([]string{ - "MzgwNjUyNnxTWU5USHxNT05JVE9SfDhkYmMyYmIwLTQwZjgtNDA5NC05OTA1LTdhZGE2ZGViMmEwNg", - "MzgwNjUyNnxTWU5USHxNT05JVE9SfDViZDNmYTk4LTA2NjgtNGQ1Yy05ODU2LTk3MzlmNWViY2JlNg", - "MzgwNjUyNnxTWU5USHxNT05JVE9SfGFmZmM0MTRiLTVhNmMtNGI5NS1iMzYwLThhNmQ2ZTkzOTM3Yw", + "MzgwNjUyNnxTWU5USHxNT05JVE9SfDkwODEwNTRhLWRhYTAtNGI0Mi05YmIwLTY3M2M1MDI2ZWYyOA", + "MzgwNjUyNnxTWU5USHxNT05JVE9SfGEyNWRmOTIwLTcxYjUtNDlmYy1iZTgzLTBhOGE0NjdiYWNhMg", + "MzgwNjUyNnxTWU5USHxNT05JVE9SfDAzNjQ0ZDNlLTg0YzMtNDQyMC1hYjM4LTc0ZjBjODI4NTk3ZA", }) func convertStringListToString(list []string) string {