-
Notifications
You must be signed in to change notification settings - Fork 811
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
Fix flaky Local SDK test #1586
Fix flaky Local SDK test #1586
Conversation
d30668c
to
76b69bc
Compare
@@ -125,6 +125,8 @@ func TestLocalSDKServerSetLabel(t *testing.T) { | |||
} | |||
|
|||
for k, v := range fixtures { | |||
k := k |
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.
I've seen this before, and I feel like I've done similar to fix previous issues and I forget the reason for it. Can we add a note explaining?
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.
yes, I will do (there is a gocritic
linter article about this), btw on the multiple runs still get some errors. Will update the test one more time
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.
It was not gocritic
, but https://github.com/kyoh86/scopelint and it is obsolete, with two successors.
Strange enough I have received error here, something wrong with
|
Build Succeeded 👏 Build Id: 35ca3c2b-c34d-4eca-9e42-c5600b8fbe21 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: 050b18ef-9013-46e9-b506-9c43c8a8c039 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:
|
Will add this comment here:
This one above would not have a deadlock and without t.Parallel() it has. So nested parallel tests could use different variables set. |
76b69bc
to
0cc6037
Compare
Line 281 is flaky.
I am running all tests in |
Build Succeeded 👏 Build Id: a621a926-f4e1-4968-94cd-c27899d6a23a 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:
|
t.Run(k, func(t *testing.T) { | ||
t.Parallel() |
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.
This line leads to unpredictable behaviour. I assume we can add this back in a separate PR.
Build Succeeded 👏 Build Id: 3221cbdb-084d-4482-b63b-3d0cd8963e10 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.
Nice cleanup!
[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 |
One rare failed test still exist (1 out of 144 tests):
And |
* Fix flaky Local SDK test * Extend Watch update to wait for file update Line 281 is flaky.
What type of PR is this?
/kind hotfix
What this PR does / Why we need it:
Fix LocalSDK test which is flaky.
Which issue(s) this PR fixes:
Special notes for your reviewer:
There is still a timeout possible here:
agones/pkg/sdkserver/localsdk_test.go
Line 281 in d30668c