Skip to content

Commit

Permalink
Fix BulkByScrollResponseTests exception assertions (#45519)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Tim-Brooks committed Oct 9, 2019
1 parent 6f4b7e9 commit d18ff24
Showing 1 changed file with 0 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
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> {

Expand Down Expand Up @@ -121,7 +120,6 @@ public static void assertEqualBulkResponse(BulkByScrollResponse expected, BulkBy
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());
Expand All @@ -132,7 +130,6 @@ public static void assertEqualBulkResponse(BulkByScrollResponse expected, BulkBy
assertEquals(expectedFailure.getShardId(), actualFailure.getShardId());
assertEquals(expectedFailure.getNodeId(), actualFailure.getNodeId());
assertEquals(expectedFailure.getStatus(), actualFailure.getStatus());
assertThat(actualFailure.getReason().getMessage(), containsString(expectedFailure.getReason().getMessage()));
}
}

Expand Down

0 comments on commit d18ff24

Please sign in to comment.