Flaky Test: TestGameServerAllocationReturnLabels#4435
Flaky Test: TestGameServerAllocationReturnLabels#4435Sivasankaran25 wants to merge 4 commits intogoogleforgames:mainfrom
Conversation
|
Build Succeeded 🥳 Build Id: a765df12-e1ab-4f81-82d0-68838557c782 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
|
Build Failed 😭 Build Id: 07ca1545-b7cb-4a5c-b16f-477889d0e21a Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
Build Succeeded 🥳 Build Id: 91fde476-2248-4b2f-93e8-d90926e17378 The following development artifacts have been built, and will exist for the next 30 days:
A preview of the website (the last 30 builds are retained): To install this version: |
markmandel
left a comment
There was a problem hiding this comment.
I think this is heading in the right direction, but isn't quite there yet.
| require.Equal(t, allocationv1.GameServerAllocationAllocated, gsa.Status.State) | ||
| require.NotEmpty(t, gsa.Status.GameServerName) | ||
|
|
||
| require.Eventually(t, func() bool { |
There was a problem hiding this comment.
I recently found https://pkg.go.dev/github.com/stretchr/testify@v1.11.1/require#EventuallyWithT - which for more complicated test conditions is definitely a better option for sure.
Then we can maintain the checks for labels and annotations, and have them reported in a way that's easier to read.
| gsa, err = framework.AgonesClient. | ||
| AllocationV1(). | ||
| GameServerAllocations(framework.Namespace). | ||
| Create(ctx, gsa.DeepCopy(), metav1.CreateOptions{}) |
There was a problem hiding this comment.
Does this fix the flake where this comes back with an Unallocated state? Should the eventually be wrapping the allocation call?
What type of PR is this?
/kind bug
What this PR does / Why we need it:
Which issue(s) this PR fixes:
Closes #4431
Special notes for your reviewer: