-
Notifications
You must be signed in to change notification settings - Fork 817
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add func to wait for fleet condition without Fatalf #1065
Add func to wait for fleet condition without Fatalf #1065
Conversation
Build Succeeded 👏 Build Id: 53def889-abed-48c3-8192-49923abb5846 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:
|
f57c319
to
e8692b2
Compare
Build Succeeded 👏 Build Id: c6a16e58-623a-4236-907f-f5bd22475a93 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 Succeeded 👏 Build Id: ace0f078-7a4c-465d-b118-f1cfaef5395e 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:
|
err := f.WaitForFleetConditionParallel(t, flt, condition) | ||
if err != nil { | ||
// Do not call Fatalf() from go routine other than main test go routine, because it could cause a race | ||
t.Fatalf("error waiting for fleet condition on fleet %v", flt.Name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now that I'm looking at this, should this function instead return an error
if it fails, much like we do for other Wait*
commands (example). That would make it simpler no? (and we no longer need to pass through testing.T
either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a 73 occurrences of WaitForFleetCondition() so it is handy to enclose this Fatalf()
function inside this helper ( if it called from main test routine).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then I would argue should really be an AssertFleetCondition - rather than a wait. Because it's making an assertion, rather than waiting for a result.
e8692b2
to
e221a98
Compare
Build Succeeded 👏 Build Id: 25a4b2f1-a469-48ab-be7c-eae4a66e8343 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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent!
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: aLekSer, markmandel The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
New changes are detected. LGTM label has been removed. |
Build Failed 😱 Build Id: d5147298-3f07-4279-8ee8-a2a4ddb4f7bf To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Looks like this failed a lint check. |
Will fix that in a moment. |
2871be4
to
30469cc
Compare
Build Failed 😱 Build Id: 98914077-3778-4329-bb5e-6f11884c3b40 To get permission to view the Cloud Build view, join the agones-discuss Google Group. |
Add a function which would return error instead failing the test. Add error stream to finish stress test gracefully in case there is no capacity in a cluster for a specific test. It is forbidden to call t.Fatalf() from go routine other than main test routine.
30469cc
to
4804c62
Compare
Oops, added but forgot to do |
Build Succeeded 👏 Build Id: 8b7b2c8e-d0cb-4c38-b824-dda4be754eeb 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:
|
Fix stress test race condition.
Rename function
WaitForFleetCondition()
->AssertFleetCondition()
as it not only wait but also asserts.It is forbidden to call t.Fatalf() from go routine other than main test routine.
Closes #1055.