Skip to content

Commit 26510fb

Browse files
committed
skip failing test
1 parent bfe08b4 commit 26510fb

File tree

2 files changed

+11
-0
lines changed
  • x-pack/plugin/esql/qa/server

2 files changed

+11
-0
lines changed

x-pack/plugin/esql/qa/server/single-node/src/javaRestTest/java/org/elasticsearch/xpack/esql/qa/single_node/RestEsqlIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ public void testInvalidPragma() throws IOException {
9797
assertOK(client().performRequest(request));
9898
}
9999
RequestObjectBuilder builder = requestObjectBuilder().query("from test-index | limit 1 | keep f");
100+
builder.allPartialResults(false);
100101
builder.pragmas(Settings.builder().put("data_partitioning", "invalid-option").build());
101102
ResponseException re = expectThrows(ResponseException.class, () -> runEsqlSync(builder));
102103
assertThat(EntityUtils.toString(re.getResponse().getEntity()), containsString("No enum constant"));
@@ -107,6 +108,7 @@ public void testInvalidPragma() throws IOException {
107108
public void testPragmaNotAllowed() throws IOException {
108109
assumeFalse("pragma only disabled on release builds", Build.current().isSnapshot());
109110
RequestObjectBuilder builder = requestObjectBuilder().query("row a = 1, b = 2");
111+
builder.allPartialResults(false);
110112
builder.pragmas(Settings.builder().put("data_partitioning", "shard").build());
111113
ResponseException re = expectThrows(ResponseException.class, () -> runEsqlSync(builder));
112114
assertThat(EntityUtils.toString(re.getResponse().getEntity()), containsString("[pragma] only allowed in snapshot builds"));

x-pack/plugin/esql/qa/server/src/main/java/org/elasticsearch/xpack/esql/qa/rest/RestEsqlTestCase.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ public static class RequestObjectBuilder {
127127
private Boolean includeCCSMetadata = null;
128128

129129
private CheckedConsumer<XContentBuilder, IOException> filter;
130+
private Boolean allPartialResults = null;
130131

131132
public RequestObjectBuilder() throws IOException {
132133
this(randomFrom(XContentType.values()));
@@ -204,6 +205,11 @@ public RequestObjectBuilder filter(CheckedConsumer<XContentBuilder, IOException>
204205
return this;
205206
}
206207

208+
public RequestObjectBuilder allPartialResults(boolean allPartialResults) {
209+
this.allPartialResults = allPartialResults;
210+
return this;
211+
}
212+
207213
public RequestObjectBuilder build() throws IOException {
208214
if (isBuilt == false) {
209215
if (tables != null) {
@@ -1150,6 +1156,9 @@ static Request prepareRequestWithOptions(RequestObjectBuilder requestObject, Mod
11501156
requestObject.build();
11511157
Request request = prepareRequest(mode);
11521158
String mediaType = attachBody(requestObject, request);
1159+
if (requestObject.allPartialResults != null) {
1160+
request.addParameter("all_partial_results", String.valueOf(requestObject.allPartialResults));
1161+
}
11531162

11541163
RequestOptions.Builder options = request.getOptions().toBuilder();
11551164
options.setWarningsHandler(WarningsHandler.PERMISSIVE); // We assert the warnings ourselves

0 commit comments

Comments
 (0)