Skip to content

Commit d6d032d

Browse files
Fix Test Failures from MockNioTransport Logger (elastic#42545)
* This call can fail when it tries to re-schedule the timeout check after the threadpool was shut down already failing tests with RejectedExecutionException
1 parent 13af50a commit d6d032d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/framework/src/main/java/org/elasticsearch/transport/nio/MockNioTransport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ private void logLongRunningExecutions() {
372372
}
373373
}
374374
if (stopped == false) {
375-
threadPool.schedule(this::logLongRunningExecutions, CHECK_INTERVAL, ThreadPool.Names.GENERIC);
375+
threadPool.scheduleUnlessShuttingDown(CHECK_INTERVAL, ThreadPool.Names.GENERIC, this::logLongRunningExecutions);
376376
}
377377
}
378378

0 commit comments

Comments
 (0)