Don't assume byte for byte equality because internal structures do not guarantee order
This commit is contained in:
parent
18fef3de2a
commit
8e255337f8
|
@ -31,7 +31,7 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
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.emptyIterable;
|
||||||
import static org.hamcrest.Matchers.equalTo;
|
import static org.hamcrest.Matchers.equalTo;
|
||||||
import static org.hamcrest.Matchers.not;
|
import static org.hamcrest.Matchers.not;
|
||||||
|
@ -146,7 +146,7 @@ public class SamlServiceProviderDocumentTests extends IdpSamlTestCase {
|
||||||
assertThat(obj2, equalTo(obj1));
|
assertThat(obj2, equalTo(obj1));
|
||||||
|
|
||||||
final BytesReference bytes2 = XContentHelper.toXContent(obj2, xContentType, humanReadable);
|
final BytesReference bytes2 = XContentHelper.toXContent(obj2, xContentType, humanReadable);
|
||||||
assertThat(bytes2, equalTo(bytes1));
|
assertToXContentEquivalent(bytes1, bytes2, xContentType);
|
||||||
|
|
||||||
return obj2;
|
return obj2;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue