Skip to content

Commit 935c59b

Browse files
committed
Fix test execution.
1 parent fa9fd6c commit 935c59b

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/inference/bulk/BulkInferenceExecutorTests.java

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
import java.util.Iterator;
2828
import java.util.List;
2929
import java.util.concurrent.CountDownLatch;
30+
import java.util.concurrent.TimeUnit;
3031
import java.util.concurrent.atomic.AtomicReference;
3132

3233
import static org.hamcrest.Matchers.allOf;
@@ -168,7 +169,7 @@ public void testParallelBulkExecution() throws Exception {
168169
});
169170
}
170171

171-
latch.await();
172+
latch.await(10, TimeUnit.SECONDS);
172173
}
173174

174175
private BulkInferenceExecutor bulkExecutor(InferenceRunner inferenceRunner) {
@@ -225,11 +226,7 @@ private void runWithRandomDelay(Runnable runnable) {
225226
if (randomBoolean()) {
226227
runnable.run();
227228
} else {
228-
threadPool.schedule(
229-
runnable,
230-
TimeValue.timeValueNanos(between(1, 1_000)),
231-
threadPool.executor(EsqlPlugin.ESQL_WORKER_THREAD_POOL_NAME)
232-
);
229+
threadPool.schedule(runnable, TimeValue.timeValueNanos(between(1, 1_000)), threadPool.generic());
233230
}
234231
}
235232
}

0 commit comments

Comments
 (0)