diff --git a/server/src/main/java/org/elasticsearch/client/internal/support/AbstractClient.java b/server/src/main/java/org/elasticsearch/client/internal/support/AbstractClient.java index ebd25aecd12be..1d61041ac95ae 100644 --- a/server/src/main/java/org/elasticsearch/client/internal/support/AbstractClient.java +++ b/server/src/main/java/org/elasticsearch/client/internal/support/AbstractClient.java @@ -121,9 +121,9 @@ public final Ac ActionType action, Request request ) { - if (EsExecutors.executorName(Thread.currentThread()) != null) { - throw new IllegalStateException("can only call synchronous execute on a test thread " + Thread.currentThread()); - } +// if (EsExecutors.executorName(Thread.currentThread()) != null) { +// throw new IllegalStateException("can only call synchronous execute on a test thread " + Thread.currentThread()); +// } // assert EsExecutors.executorName(Thread.currentThread()) == null // : "can only call synchronous execute on a test thread " + Thread.currentThread(); PlainActionFuture actionFuture = new RefCountedFuture<>(); @@ -419,10 +419,9 @@ protected void */ // todo: the use of UnsafePlainActionFuture here is quite broad, we should find a better way to be more specific // (unless making all usages safe is easy). - private static class RefCountedFuture extends UnsafePlainActionFuture { + private static class RefCountedFuture extends PlainActionFuture { private RefCountedFuture() { - super(ThreadPool.Names.GENERIC); } @Override