diff --git a/x-pack/plugin/eql/src/internalClusterTest/java/org/elasticsearch/xpack/eql/action/AbstractEqlBlockingIntegTestCase.java b/x-pack/plugin/eql/src/internalClusterTest/java/org/elasticsearch/xpack/eql/action/AbstractEqlBlockingIntegTestCase.java index 5025f1e549778..f68784623286f 100644 --- a/x-pack/plugin/eql/src/internalClusterTest/java/org/elasticsearch/xpack/eql/action/AbstractEqlBlockingIntegTestCase.java +++ b/x-pack/plugin/eql/src/internalClusterTest/java/org/elasticsearch/xpack/eql/action/AbstractEqlBlockingIntegTestCase.java @@ -209,18 +209,8 @@ public void app } logger.trace("unblocking field caps on " + nodeId); }; - final Thread originalThread = Thread.currentThread(); chain.proceed(task, action, request, - ActionListener.wrap( - resp -> { - if (originalThread == Thread.currentThread()) { - // async if we never exited the original thread - executorService.execute(() -> actionWrapper.accept(resp)); - } else { - actionWrapper.accept(resp); - } - }, - listener::onFailure) + ActionListener.wrap(resp -> executorService.execute(() -> actionWrapper.accept(resp)), listener::onFailure) ); } else { chain.proceed(task, action, request, listener);