Avoid double serialization in RPC tests#7547
Merged
emlautarom1 merged 11 commits intoOct 4, 2024
Merged
Conversation
- Use `params object?[]?` instead of strings
16 tasks
benaadams
approved these changes
Oct 3, 2024
LukaszRozmej
approved these changes
Oct 3, 2024
MarekM25
approved these changes
Oct 4, 2024
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #7483 (comment)
Changes
Types of changes
What types of changes does your code introduce?
Testing
Requires testing
If yes, did you write tests?
Notes on testing
Updated tests accordingly without changing existing behavior.
Documentation
Requires documentation update
Requires explanation in Release Notes
Remarks
During #7483 we found out that our testing code could potentially result in double serialization of objects. For example, instead of
{ "foo": 42 }we would get
"{\"foo\": 42 }"This PR addresses this issue avoiding double serialization. This also reduces the code in several test cases where we no longer need to instantiate a JSON serializer.
Due to the goal of this PR it should be reviewed independently of other refactoring PRs.