-
Notifications
You must be signed in to change notification settings - Fork 826
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
Flaky: TestControllerGameServersNodeState #1805
Flaky: TestControllerGameServersNodeState #1805
Conversation
This involves two things: (1) Adding a newFakeControllerWithMock to the metric test utilities to allow for pre-population -- which with the client-go updates make it far easier to write deterministic tests. (2) Updated TestControllerGameServersNodeState with the new mock construction. This included removing the c.run() command, which can run c.collect() at any point in time, and any number of times before the tests being checked, and replaced this a c.collect() so we can control exactly when metric collection occurs during the tests.
Build Succeeded 👏 Build Id: ce505c13-372f-462e-966f-cf6c40955e05 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.
Thanks for the test fix, this func c.collect()
looks much more appropriate for the tests now.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aLekSer, markmandel The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This involves two things: (1) Adding a newFakeControllerWithMock to the metric test utilities to allow for pre-population -- which with the client-go updates make it far easier to write deterministic tests. (2) Updated TestControllerGameServersNodeState with the new mock construction. This included removing the c.run() command, which can run c.collect() at any point in time, and any number of times before the tests being checked, and replaced this a c.collect() so we can control exactly when metric collection occurs during the tests.
What type of PR is this?
/kind bug
What this PR does / Why we need it:
This involves two things:
(1) Adding a newFakeControllerWithMock to the metric test utilities to allow for pre-population -- which with the client-go updates make it far easier to write deterministic tests.
(2) Updated TestControllerGameServersNodeState with the new mock construction.
This included removing the c.run() command, which can run c.collect() at any point in time, and any number of times before the tests being checked, and replaced this a c.collect() so we can control exactly when metric collection occurs during the tests.
Which issue(s) this PR fixes:
N/A
Special notes for your reviewer:
Ran this a few hundred times, no failures.