Skip to content

Commit

Permalink
Fix SamlServiceProviderDocumentTests (#54718) (#54724)
Browse files Browse the repository at this point in the history
Don't assume byte for byte equality because internal structures
 do not guarantee order
  • Loading branch information
jkakavas committed Apr 3, 2020
1 parent 8579eda commit 3205d2b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import java.util.Map;
import java.util.stream.Collectors;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertToXContentEquivalent;
import static org.hamcrest.Matchers.emptyIterable;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
Expand Down Expand Up @@ -146,7 +146,7 @@ private SamlServiceProviderDocument assertXContentRoundTrip(SamlServiceProviderD
assertThat(obj2, equalTo(obj1));

final BytesReference bytes2 = XContentHelper.toXContent(obj2, xContentType, humanReadable);
assertThat(bytes2, equalTo(bytes1));
assertToXContentEquivalent(bytes1, bytes2, xContentType);

return obj2;
}
Expand Down

0 comments on commit 3205d2b

Please sign in to comment.