Fixing non-deterministic dict. failure in extra_types_test.#11
Merged
craigcitro merged 1 commit intogoogle:masterfrom Mar 31, 2015
dhermes:fix-json-string-order
Merged
Fixing non-deterministic dict. failure in extra_types_test.#11craigcitro merged 1 commit intogoogle:masterfrom dhermes:fix-json-string-order
craigcitro merged 1 commit intogoogle:masterfrom
dhermes:fix-json-string-order
Conversation
Failure occurs when comparing encoded strings via json.dumps and apitools.base.py.encoding.MessageToJson. The MessageToJson function has non-deterministic results, as does json.dumps.
1 similar comment
craigcitro
added a commit
that referenced
this pull request
Mar 31, 2015
Fixing non-deterministic dict. failure in extra_types_test.
Contributor
Author
|
@craigcitro Are you not concerned that |
Contributor
|
it's something to clean up, but we only really use JSON encoding for sending things over the wire (and the server doesn't care about key order). unless i'm missing something, this should only be an issue for tests that use literal json strings, right? i was planning to file an issue later, but i'll do it now. |
Contributor
Author
|
Yeah I wasn't sure it mattered, but figured it might because this test failure. |
Contributor
|
i have a record/replay framework on top of apitools internally that i'm planning to push out at some point; that would likely be more fragile on this front. ;) |
Contributor
Author
|
Nice! |
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.
Failure occurs when comparing encoded strings via
json.dumpsandapitools.base.py.encoding.MessageToJson.The
MessageToJsonfunction has non-deterministic results, as doesjson.dumps.@craigcitro This fixes the failure in #9.