Skip to content

Commit

Permalink
Review updates.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmandel committed Jul 20, 2023
1 parent 1cdbf57 commit 8a923ae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pkg/gameserverallocations/allocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 8a923ae

Please sign in to comment.