Fix BulkByScrollResponseTests exception assertions (#45519)

Currently in the x content serialization tests we compare the exception
messages that are serialized. These exceptions messages are not
equivalent because the exception often changes when serialized to x
content. This commit removes this assertion.
This commit is contained in:
Tim Brooks 2019-08-13 19:44:39 -04:00
parent 6f4b7e9a7f
commit d18ff24dbe
No known key found for this signature in database
GPG Key ID: C2AA3BB91A889E77
1 changed files with 0 additions and 3 deletions

View File

@ -40,7 +40,6 @@ import static java.util.Collections.emptyList;
import static java.util.Collections.singletonList;
import static org.apache.lucene.util.TestUtil.randomSimpleString;
import static org.elasticsearch.common.unit.TimeValue.timeValueMillis;
import static org.hamcrest.Matchers.containsString;
public class BulkByScrollResponseTests extends AbstractXContentTestCase<BulkByScrollResponse> {
@ -121,7 +120,6 @@ public class BulkByScrollResponseTests extends AbstractXContentTestCase<BulkBySc
assertEquals(expectedFailure.getIndex(), actualFailure.getIndex());
assertEquals(expectedFailure.getType(), actualFailure.getType());
assertEquals(expectedFailure.getId(), actualFailure.getId());
assertThat(expectedFailure.getMessage(), containsString(actualFailure.getMessage()));
assertEquals(expectedFailure.getStatus(), actualFailure.getStatus());
}
assertEquals(expected.getSearchFailures().size(), actual.getSearchFailures().size());
@ -132,7 +130,6 @@ public class BulkByScrollResponseTests extends AbstractXContentTestCase<BulkBySc
assertEquals(expectedFailure.getShardId(), actualFailure.getShardId());
assertEquals(expectedFailure.getNodeId(), actualFailure.getNodeId());
assertEquals(expectedFailure.getStatus(), actualFailure.getStatus());
assertThat(actualFailure.getReason().getMessage(), containsString(expectedFailure.getReason().getMessage()));
}
}