test: fix flaky TestPortRangeAllocatorSyncDeleteGameServer#4399
Conversation
Fixing the race condition that an event may not have fired even though Agones client list operations may be returning the correct list values. Utilised `Eventually` and `Never` to ensure we tested for eventual final states. Closes agones-dev#4390
|
Build Succeeded 🥳 Build Id: 02ff7fd2-3273-4e7b-bb27-a9af1c5d6cf3 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: 48359fc9-574f-43ba-a29c-541461d6652e Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
New flake? /gcbrun |
|
Build Failed 😭 Build Id: 5a4a6153-eb0e-4106-8534-9ddc1153cc57 Status: FAILURE To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
|
Seen that yesterday locally, I have set a timeout way too short, like 50ms 😅 |
|
Doh. TestControllerGameServersNodeState. I have a fix for this one locally, I need to do a quick review for it and get it up. /gcbrun |
|
Build Succeeded 🥳 Build Id: 4131bddb-e066-437d-bc6f-ca56fac6a5b8 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: |
…v#4399) Fixing the race condition that an event may not have fired even though Agones client list operations may be returning the correct list values. Utilised `Eventually` and `Never` to ensure we tested for eventual final states. Closes agones-dev#4390
What type of PR is this?
/kind cleanup
What this PR does / Why we need it:
Fixing the race condition that an event may not have fired even though Agones client list operations may be returning the correct list values.
Utilised
EventuallyandNeverto ensure we tested for eventual final states, as well as making some small test improvements along the way.Which issue(s) this PR fixes:
Closes #4390
Special notes for your reviewer:
I ran this 200 times with no issues.
@Sivasankaran25 PTAL - I couldn't see any race conditions that would cause the failures we were seeing in your PR, but I dug into the issue, and this is where I landed. Lemme know if I missed anything though!