Skip to content

Commit ada9bf2

Browse files
committed
Review comments
1 parent 83f8a59 commit ada9bf2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@
7676
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.RERANK;
7777
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SEMANTIC_TEXT_FIELD_CAPS;
7878
import static org.elasticsearch.xpack.esql.action.EsqlCapabilities.Cap.SOURCE_FIELD_MAPPING;
79+
import static org.hamcrest.Matchers.anyOf;
80+
import static org.hamcrest.Matchers.is;
81+
import static org.hamcrest.Matchers.nullValue;
7982

8083
// This test can run very long in serverless configurations
8184
@TimeoutSuite(millis = 30 * TimeUnits.MINUTE)
@@ -273,8 +276,9 @@ protected final void doTest(String query) throws Throwable {
273276
Map<?, ?> prevTooks = supportsTook() ? tooks() : null;
274277
Map<String, Object> answer = runEsql(builder.query(query), testCase.assertWarnings(deduplicateExactWarnings()));
275278

276-
var isPartial = answer.get("is_partial");
277-
assertTrue("unexpected partial results", isPartial == null || (boolean) isPartial == false);
279+
var clusters = answer.get("_clusters");
280+
var reason = "unexpected partial results" + (clusters != null ? ": _clusters=" + clusters : "");
281+
assertThat(reason, answer.get("is_partial"), anyOf(nullValue(), is(false)));
278282

279283
var expectedColumnsWithValues = loadCsvSpecValues(testCase.expectedResults);
280284

0 commit comments

Comments
 (0)