Skip to content

Commit

Permalink
Tests fix - Graph HLRC client overly long line and syncing core’s cop…
Browse files Browse the repository at this point in the history
…y of GraphExploreResponseTests taken from protocol.

Related to #33231
  • Loading branch information
markharwood committed Aug 29, 2018
1 parent 2463681 commit c0c53cf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import org.elasticsearch.ElasticsearchException;
import org.elasticsearch.action.ShardOperationFailedException;
import org.elasticsearch.action.search.ShardSearchFailure;
import org.elasticsearch.common.Strings;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentParser;
import org.elasticsearch.test.AbstractXContentTestCase;
Expand Down Expand Up @@ -63,7 +62,7 @@ private static GraphExploreResponse createInstance(int numFailures) {

@Override
protected String[] getShuffleFieldsExceptions() {
return new String[]{"vertices"};
return new String[]{"vertices", "connections"};
}

private static GraphExploreResponse createTestInstanceWithFailures() {
Expand Down Expand Up @@ -115,7 +114,8 @@ public void testFromXContentWithFailures() throws IOException {
boolean supportsUnknownFields = true;
//exceptions are not of the same type whenever parsed back
boolean assertToXContentEquivalence = false;
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, Strings.EMPTY_ARRAY,
AbstractXContentTestCase.testFromXContent(
NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, getShuffleFieldsExceptions(),
getRandomFieldsExcludeFilterWhenResultHasErrors(), this::createParser, this::doParseInstance,
this::assertEqualInstances, assertToXContentEquivalence, ToXContent.EMPTY_PARAMS);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ private static GraphExploreResponse createInstance(int numFailures) {

@Override
protected String[] getShuffleFieldsExceptions() {
return new String[]{"vertices"};
return new String[]{"vertices", "connections"};
}

private static GraphExploreResponse createTestInstanceWithFailures() {
Expand Down Expand Up @@ -127,7 +127,8 @@ public void testFromXContentWithFailures() throws IOException {
boolean supportsUnknownFields = true;
//exceptions are not of the same type whenever parsed back
boolean assertToXContentEquivalence = false;
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, getShuffleFieldsExceptions(),
AbstractXContentTestCase.testFromXContent(
NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, getShuffleFieldsExceptions(),
getRandomFieldsExcludeFilterWhenResultHasErrors(), this::createParser, this::doParseInstance,
this::assertEqualInstances, assertToXContentEquivalence, ToXContent.EMPTY_PARAMS);
}
Expand Down

0 comments on commit c0c53cf

Please sign in to comment.