From c2e30e4b638469744257f5b5bd6b1a52ab362bf9 Mon Sep 17 00:00:00 2001 From: Aastha Mahendru Date: Tue, 24 Sep 2024 11:44:01 +0100 Subject: [PATCH 1/2] make datadog test non-parallel --- .../resource_alert_configuration_migration_test.go | 2 +- .../alertconfiguration/resource_alert_configuration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go b/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go index 372600873c..2fedc1c635 100644 --- a/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go +++ b/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go @@ -146,5 +146,5 @@ func TestMigConfigRSAlertConfiguration_withEmptyOptionalAttributes(t *testing.T) func TestMigConfigRSAlertConfiguration_withDataDog(t *testing.T) { mig.SkipIfVersionBelow(t, "1.20.0") - mig.CreateAndRunTest(t, datadogTestCase(t)) + mig.CreateAndRunTestNonParallel(t, datadogTestCase(t)) } diff --git a/internal/service/alertconfiguration/resource_alert_configuration_test.go b/internal/service/alertconfiguration/resource_alert_configuration_test.go index 3be5556a82..31cf70f80b 100644 --- a/internal/service/alertconfiguration/resource_alert_configuration_test.go +++ b/internal/service/alertconfiguration/resource_alert_configuration_test.go @@ -368,7 +368,7 @@ func TestAccConfigRSAlertConfiguration_updatePagerDutyWithNotifierId(t *testing. } func TestAccConfigRSAlertConfiguration_withDataDog(t *testing.T) { - resource.ParallelTest(t, *datadogTestCase(t)) + resource.Test(t, *datadogTestCase(t)) } func datadogTestCase(t *testing.T) *resource.TestCase { From dde269e31a5b03f0da5880b46698609477183e8e Mon Sep 17 00:00:00 2001 From: maastha <122359335+maastha@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:58:20 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Leo Antoli <430982+lantoli@users.noreply.github.com> --- .../resource_alert_configuration_migration_test.go | 2 +- .../alertconfiguration/resource_alert_configuration_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go b/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go index 2fedc1c635..7d58f41c69 100644 --- a/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go +++ b/internal/service/alertconfiguration/resource_alert_configuration_migration_test.go @@ -146,5 +146,5 @@ func TestMigConfigRSAlertConfiguration_withEmptyOptionalAttributes(t *testing.T) func TestMigConfigRSAlertConfiguration_withDataDog(t *testing.T) { mig.SkipIfVersionBelow(t, "1.20.0") - mig.CreateAndRunTestNonParallel(t, datadogTestCase(t)) + mig.CreateAndRunTestNonParallel(t, datadogTestCase(t)) // not run in parallel so acc and mig tests don't interfere } diff --git a/internal/service/alertconfiguration/resource_alert_configuration_test.go b/internal/service/alertconfiguration/resource_alert_configuration_test.go index 31cf70f80b..ff824e06f4 100644 --- a/internal/service/alertconfiguration/resource_alert_configuration_test.go +++ b/internal/service/alertconfiguration/resource_alert_configuration_test.go @@ -368,7 +368,7 @@ func TestAccConfigRSAlertConfiguration_updatePagerDutyWithNotifierId(t *testing. } func TestAccConfigRSAlertConfiguration_withDataDog(t *testing.T) { - resource.Test(t, *datadogTestCase(t)) + resource.Test(t, *datadogTestCase(t)) // not run in parallel so acc and mig tests don't interfere } func datadogTestCase(t *testing.T) *resource.TestCase {