-
Notifications
You must be signed in to change notification settings - Fork 819
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 PlayerTracking IDs to SDK Convert function #1498
Add PlayerTracking IDs to SDK Convert function #1498
Conversation
When converting from CRD->gRPC model, add the Player Tracking IDs Work on googleforgames#1033
Build Succeeded 👏 Build Id: 8f728926-22dc-4e53-bfec-87d77de38b53 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: 5faea94d-3c58-4ac0-8ad2-b44f3da54668 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:
|
|
||
sdkGs := convert(gs) | ||
eq(t, fixture, sdkGs) | ||
assert.Zero(t, sdkGs.ObjectMeta.DeletionTimestamp) | ||
assert.Equal(t, gs.Status.Players.Capacity, sdkGs.Status.Players.Capacity) | ||
assert.Equal(t, gs.Status.Players.Count, sdkGs.Status.Players.Count) | ||
assert.Equal(t, gs.Status.Players.IDs, sdkGs.Status.Players.IDs) |
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 think in the future there is a need to disable (reset) featureGates
after this and similar tests.
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 is actually by design. This let's us randomly test out various areas of the code with Feature flags both on and off, and find errors -- it's already found one 😃
When setting feature flags at the beginning of a Test, it overwrites all feature flags, so you know you have the desired state at that point.
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 an explanation, just was curious what was expected here.
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 is also why we have the runtime.FeatureTestMutex.Lock()
in place, so that Feature Flag'd tests can't interfere with each other.
I found in my testing of this, you actually can't rely on removing t.Parrallel, as without it, go test runs the tests in that file in serial, but each file becomes its own executable, and they are run in parallel, and everything becomes hard at that point.
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.
Well, this might also be reasonable to test some combinations of featureFlags.
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.
Approving, left one comment for the future tests of FeatureGates. We probably need to have a function to reset all FeatureGates. Otherwise they can interfere each other in one tests.
Note that test is declared as t.Parallel()
.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aLekSer, markmandel, roberthbailey 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 |
Build Succeeded 👏 Build Id: 86ddef6f-89d0-4b53-ae99-70af64a6988c 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:
|
When converting from CRD->gRPC model, add the Player Tracking IDs Work on googleforgames#1033 Co-authored-by: Alexander Apalikov <alexander.apalikov@globant.com>
What type of PR is this?
/kind feature
What this PR does / Why we need it:
When converting from CRD->gRPC model for SDK.GetGameServer(), add the Player Tracking IDs
Which issue(s) this PR fixes:
Work on #1033
Special notes for your reviewer:
None