From 8a923ae7d8c72622d18e0742df2e53f1032f65ae Mon Sep 17 00:00:00 2001 From: Mark Mandel Date: Thu, 20 Jul 2023 12:51:48 -0700 Subject: [PATCH] Review updates. --- pkg/gameserverallocations/allocator_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkg/gameserverallocations/allocator_test.go b/pkg/gameserverallocations/allocator_test.go index 65549895a9..a395a537d8 100644 --- a/pkg/gameserverallocations/allocator_test.go +++ b/pkg/gameserverallocations/allocator_test.go @@ -131,6 +131,10 @@ func TestAllocatorAllocate(t *testing.T) { func TestAllocatorAllocatePriority(t *testing.T) { t.Parallel() + // TODO: remove when `CountsAndLists` feature flag is moved to stable. + runtime.FeatureTestMutex.Lock() + defer runtime.FeatureTestMutex.Unlock() + run := func(t *testing.T, name string, test func(t *testing.T, a *Allocator, gas *allocationv1.GameServerAllocation)) { f, gsList := defaultFixtures(4) a, m := newFakeAllocator() @@ -442,6 +446,12 @@ func TestAllocationApplyAllocationError(t *testing.T) { } func TestAllocatorAllocateOnGameServerUpdateError(t *testing.T) { + t.Parallel() + + // TODO: remove when `CountsAndLists` feature flag is moved to stable. + runtime.FeatureTestMutex.Lock() + defer runtime.FeatureTestMutex.Unlock() + a, m := newFakeAllocator() _, gsList := defaultFixtures(4) @@ -492,6 +502,10 @@ func TestAllocatorAllocateOnGameServerUpdateError(t *testing.T) { func TestAllocatorRunLocalAllocations(t *testing.T) { t.Parallel() + // TODO: remove when `CountsAndLists` feature flag is moved to stable. + runtime.FeatureTestMutex.Lock() + defer runtime.FeatureTestMutex.Unlock() + t.Run("no problems", func(t *testing.T) { f, gsList := defaultFixtures(5) gsList[0].Status.NodeName = "special"