-
Notifications
You must be signed in to change notification settings - Fork 364
Do not send count and offset params when requesting the entire object #5356
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
Conversation
| offset: 2, | ||
| count: 4, | ||
| ); | ||
| expect(mapGrouping.isPartialObject, isTrue); |
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.
instead of duplicating all the groups for childCount and isPartialObject, can we just make 'map instances', 'list instances' etc. top level groups for which we check the childCount and isPartialObject values?
also, should we check Set objects too?
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.
Good idea, refactored the test. Also added test cases for sets
| buildListVariable(), | ||
| buildMapVariable(), | ||
| buildStringVariable('test str'), | ||
| buildBooleanVariable(true), |
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.
can we add a Set variable in here too?
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! Done. Refactored a little to avoid test case duplication with verifyGroupings method
Fixes #5329
Previously, for objects where there was no explicitly set offset and childCount, we were sending
getObjectrequests withoffsetset to 0 andcountset to the length of the object (if it was aList,Map,RecordorSetinstance) or 0 if it wasn't.This was causing the following problem: if we missed any of the instance kinds that had a
length(for example, we were missingSetinstances), then we would send agetObjectrequest withcountequal to 0. The VM service would then correctly respond with an empty object.This PR does not include
offsetandcountparams ingetObjectrequests, unless we are explicitly requesting a partial object.