From fd257fd0f9f5e2d78a4965eaf27e88836854cd44 Mon Sep 17 00:00:00 2001 From: Matt Boersma Date: Thu, 16 Jun 2022 16:45:45 -0600 Subject: [PATCH] Serialize unit test to prevent flaky failures --- exp/api/v1beta1/azuremachinepool_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exp/api/v1beta1/azuremachinepool_test.go b/exp/api/v1beta1/azuremachinepool_test.go index c6d1c27f442..4c5e4efd35b 100644 --- a/exp/api/v1beta1/azuremachinepool_test.go +++ b/exp/api/v1beta1/azuremachinepool_test.go @@ -134,7 +134,7 @@ func TestAzureMachinePool_Validate(t *testing.T) { for _, c := range cases { c := c t.Run(c.Name, func(t *testing.T) { - t.Parallel() + // Don't add t.Parallel() here or the test will fail. // NOTE: AzureMachinePool is behind MachinePool feature gate flag; the web hook // must prevent creating new objects in case the feature flag is disabled. defer utilfeature.SetFeatureGateDuringTest(t, feature.Gates, capifeature.MachinePool, true)()