From fef187463ac1fa5583a491575c6d37ab900922db Mon Sep 17 00:00:00 2001 From: Armin Braun Date: Wed, 7 Jul 2021 20:32:30 +0200 Subject: [PATCH] Fix SQL Blocking IntegTests (#75083) We have a number of failures in these tests due to #75022 which makes the field caps transport action fork to the management pool. -> we have to always fork in this test now to not block the management pool. --- .../sql/action/AbstractSqlBlockingIntegTestCase.java | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/x-pack/plugin/sql/src/internalClusterTest/java/org/elasticsearch/xpack/sql/action/AbstractSqlBlockingIntegTestCase.java b/x-pack/plugin/sql/src/internalClusterTest/java/org/elasticsearch/xpack/sql/action/AbstractSqlBlockingIntegTestCase.java index 64935d69b56a4..37689f2e4995e 100644 --- a/x-pack/plugin/sql/src/internalClusterTest/java/org/elasticsearch/xpack/sql/action/AbstractSqlBlockingIntegTestCase.java +++ b/x-pack/plugin/sql/src/internalClusterTest/java/org/elasticsearch/xpack/sql/action/AbstractSqlBlockingIntegTestCase.java @@ -227,18 +227,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);