-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(firestore): fix the query round trip test (#10585)
The QueryFromProtoRoundTrip test was failing intermittently, because it relied on the iteration order of maps. Looking at it more closely, the test's more significant problem was that it was comparing byte slices, so diffs were unhelpful. Change the test to compare protos before and after round-tripping. All cases now pass reliably. Use subtests to make it easier to isolate individual cases for debugging. Also, fix a potential bug when converting a proto to a Query: the transformation from a structured filter to a list of filters is only valid for AND filters, not OR filters.
- Loading branch information
Showing
2 changed files
with
22 additions
and
27 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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