Skip to content

Commit

Permalink
Flaky: TestAllocatorAllocatePriority
Browse files Browse the repository at this point in the history
Fix a flake that would see a feature flag flip _just_ between
`ApplyDefaults()` and `Validate()` -- which is more impressive than
anything else.

```
--- FAIL: TestAllocatorAllocatePriority (1.18s)
    allocator_test.go:169:
        	Error Trace:	/go/src/agones.dev/agones/pkg/gameserverallocations/allocator_test.go:169
        	            				/go/src/agones.dev/agones/pkg/gameserverallocations/allocator_test.go:176
        	Error:      	"[spec.selectors[0].counters: Forbidden: Feature CountsAndLists must be enabled spec.selectors[0].lists: Forbidden: Feature CountsAndLists must be enabled]" should have 0 item(s), but has 2
        	Test:       	TestAllocatorAllocatePriority
```
  • Loading branch information
markmandel committed Jul 20, 2023
1 parent 71ab422 commit 25dfb80
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/gameserverallocations/allocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ import (
func TestAllocatorAllocate(t *testing.T) {
t.Parallel()

// TODO: remove when `CountsAndLists` feature flag is moved to stable.
runtime.FeatureTestMutex.Lock()
defer runtime.FeatureTestMutex.Unlock()

f, gsList := defaultFixtures(4)
a, m := newFakeAllocator()
n := metav1.Now()
Expand Down

0 comments on commit 25dfb80

Please sign in to comment.