Skip to content

Commit 8e4ad76

Browse files
Revert "Re-enable some performance updates to ES|QL spec tests after resilience improvement to EsqlSpecTestCase (#136781)" (#137589)
This reverts commit 4d3e27f. Yesterday we merged two performance updates to ES|QL Spec tests that had been reverted two months back after noticing some increased test flakiness. However, we immediately saw increased failures due to one of them, so we reverted it. Having done that we continue to see other failures, that may or may not be related to the remaining performance update. This PR reverts that too.
1 parent ce626b3 commit 8e4ad76

File tree

1 file changed

+4
-42
lines changed
  • x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq

1 file changed

+4
-42
lines changed

x-pack/plugin/esql/qa/server/multi-clusters/src/javaRestTest/java/org/elasticsearch/xpack/esql/ccq/MultiClusterSpecIT.java

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import org.elasticsearch.Version;
1616
import org.elasticsearch.client.Request;
1717
import org.elasticsearch.client.Response;
18-
import org.elasticsearch.client.ResponseListener;
1918
import org.elasticsearch.client.RestClient;
2019
import org.elasticsearch.common.settings.Settings;
2120
import org.elasticsearch.core.IOUtils;
@@ -39,8 +38,6 @@
3938
import java.util.List;
4039
import java.util.Locale;
4140
import java.util.Set;
42-
import java.util.concurrent.CompletableFuture;
43-
import java.util.concurrent.ExecutionException;
4441
import java.util.regex.Pattern;
4542
import java.util.stream.Collectors;
4643

@@ -254,7 +251,10 @@ static RestClient twoClients(RestClient localClient, RestClient remoteClient) th
254251
return bulkClient.performRequest(request);
255252
} else {
256253
Request[] clones = cloneRequests(request, 2);
257-
return runInParallel(localClient, remoteClient, clones);
254+
Response resp1 = remoteClient.performRequest(clones[0]);
255+
Response resp2 = localClient.performRequest(clones[1]);
256+
assertEquals(resp1.getStatusLine().getStatusCode(), resp2.getStatusLine().getStatusCode());
257+
return resp2;
258258
}
259259
});
260260
doAnswer(invocation -> {
@@ -289,44 +289,6 @@ static Request[] cloneRequests(Request orig, int numClones) throws IOException {
289289
return clones;
290290
}
291291

292-
/**
293-
* Run {@link #cloneRequests cloned} requests in parallel.
294-
*/
295-
static Response runInParallel(RestClient localClient, RestClient remoteClient, Request[] clones) throws Throwable {
296-
CompletableFuture<Response> remoteResponse = new CompletableFuture<>();
297-
CompletableFuture<Response> localResponse = new CompletableFuture<>();
298-
remoteClient.performRequestAsync(clones[0], new ResponseListener() {
299-
@Override
300-
public void onSuccess(Response response) {
301-
remoteResponse.complete(response);
302-
}
303-
304-
@Override
305-
public void onFailure(Exception exception) {
306-
remoteResponse.completeExceptionally(exception);
307-
}
308-
});
309-
localClient.performRequestAsync(clones[1], new ResponseListener() {
310-
@Override
311-
public void onSuccess(Response response) {
312-
localResponse.complete(response);
313-
}
314-
315-
@Override
316-
public void onFailure(Exception exception) {
317-
localResponse.completeExceptionally(exception);
318-
}
319-
});
320-
try {
321-
Response remote = remoteResponse.get();
322-
Response local = localResponse.get();
323-
assertEquals(remote.getStatusLine().getStatusCode(), local.getStatusLine().getStatusCode());
324-
return local;
325-
} catch (ExecutionException e) {
326-
throw e.getCause();
327-
}
328-
}
329-
330292
/**
331293
* Convert FROM employees ... => FROM *:employees,employees
332294
*/

0 commit comments

Comments
 (0)