Skip to content

Commit c0c53cf

Browse files
committed
Tests fix - Graph HLRC client overly long line and syncing core’s copy of GraphExploreResponseTests taken from protocol.
Related to #33231
1 parent 2463681 commit c0c53cf

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

x-pack/plugin/core/src/test/java/org/elasticsearch/protocol/xpack/graph/GraphExploreResponseTests.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import org.elasticsearch.ElasticsearchException;
99
import org.elasticsearch.action.ShardOperationFailedException;
1010
import org.elasticsearch.action.search.ShardSearchFailure;
11-
import org.elasticsearch.common.Strings;
1211
import org.elasticsearch.common.xcontent.ToXContent;
1312
import org.elasticsearch.common.xcontent.XContentParser;
1413
import org.elasticsearch.test.AbstractXContentTestCase;
@@ -63,7 +62,7 @@ private static GraphExploreResponse createInstance(int numFailures) {
6362

6463
@Override
6564
protected String[] getShuffleFieldsExceptions() {
66-
return new String[]{"vertices"};
65+
return new String[]{"vertices", "connections"};
6766
}
6867

6968
private static GraphExploreResponse createTestInstanceWithFailures() {
@@ -115,7 +114,8 @@ public void testFromXContentWithFailures() throws IOException {
115114
boolean supportsUnknownFields = true;
116115
//exceptions are not of the same type whenever parsed back
117116
boolean assertToXContentEquivalence = false;
118-
AbstractXContentTestCase.testFromXContent(NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, Strings.EMPTY_ARRAY,
117+
AbstractXContentTestCase.testFromXContent(
118+
NUMBER_OF_TEST_RUNS, instanceSupplier, supportsUnknownFields, getShuffleFieldsExceptions(),
119119
getRandomFieldsExcludeFilterWhenResultHasErrors(), this::createParser, this::doParseInstance,
120120
this::assertEqualInstances, assertToXContentEquivalence, ToXContent.EMPTY_PARAMS);
121121
}

x-pack/protocol/src/test/java/org/elasticsearch/protocol/xpack/graph/GraphExploreResponseTests.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ private static GraphExploreResponse createInstance(int numFailures) {
7575

7676
@Override
7777
protected String[] getShuffleFieldsExceptions() {
78-
return new String[]{"vertices"};
78+
return new String[]{"vertices", "connections"};
7979
}
8080

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

0 commit comments

Comments
 (0)