NationalSecurityAgency / timely

Accumulo backed time series database
https://code.nsa.gov/timely/
Apache License 2.0
377 stars 108 forks source link

Fixing Nondeterministic Tests #211

Closed jonathan-stein closed 3 years ago

jonathan-stein commented 3 years ago

MetricAdapterTest#testToMetricResponse,QueryResponseTest#testOneResponse, and SearchLookupResponse#testResponse1 rely on writeValueAsString() writing the member variables in a certain order. This is unspecified without using the @JsonPropertyOrder annotation. QueryResponse and SearchLookupResponse also contain a Map member variable to be printed. HashMaps have no defined ordering so this was changed to a LinkedHashMap.

Lastly, the Authorizations.toString() function used in AuthCacheTest#getAuths does not have a guaranteed ordering