-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since snapshots include query references and query plan references, and since those can be orderered nondeterministically, the test can fail if the snapshot is built with fields in an unexpected order. The existing test tries to account for that by enumerating all possible combinations, but this is very difficult to maintain, and very difficult to scale to additional fields with this pattern. Instead, rewrite snapshots to a canonical format to ensure comparisons are stable. We can't just sort the array fields before serializing the snapshot for comparison, since QueryReferences and similar items are referenced by an index into their array. To work around that, we sort the QueryReferences (tracking their original index), and rewrite all entries that reference them to reference their new index instead. See discussion in #630 [1]. [1]: #630 (comment)
- Loading branch information
Showing
1 changed file
with
134 additions
and
123 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