Fix SamlServiceProviderDocumentTests (#54718) (#54723)

Don't assume byte for byte equality because internal structures
 do not guarantee order
This commit is contained in:
Ioannis Kakavas 2020-04-03 18:46:36 +03:00 committed by GitHub
parent 18fef3de2a
commit 8e255337f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -31,7 +31,7 @@ import java.util.List;
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;
@ -146,7 +146,7 @@ public class SamlServiceProviderDocumentTests extends IdpSamlTestCase {
assertThat(obj2, equalTo(obj1));
final BytesReference bytes2 = XContentHelper.toXContent(obj2, xContentType, humanReadable);
assertThat(bytes2, equalTo(bytes1));
assertToXContentEquivalent(bytes1, bytes2, xContentType);
return obj2;
}