Skip to content

Commit b7f5b12

Browse files
committed
Fix
1 parent 31ac057 commit b7f5b12

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server/src/test/java/org/elasticsearch/action/bulk/TransportBulkActionIngestTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ public class TransportBulkActionIngestTests extends ESTestCase {
107107
private static final Thread DUMMY_WRITE_THREAD = new Thread(ThreadPool.Names.WRITE);
108108
private FeatureService mockFeatureService;
109109

110+
private static final ExecutorService writeCoordinationExecutor = new NamedDirectExecutorService("write_coordination");
110111
private static final ExecutorService writeExecutor = new NamedDirectExecutorService("write");
111112
private static final ExecutorService systemWriteExecutor = new NamedDirectExecutorService("system_write");
112113

@@ -293,6 +294,7 @@ public <T> T invokeAny(Collection<? extends Callable<T>> tasks, long timeout, Ti
293294
public void setupAction() {
294295
// initialize captors, which must be members to use @Capture because of generics
295296
threadPool = mock(ThreadPool.class);
297+
when(threadPool.executor(eq(ThreadPool.Names.WRITE_COORDINATION))).thenReturn(writeCoordinationExecutor);
296298
when(threadPool.executor(eq(ThreadPool.Names.WRITE))).thenReturn(writeExecutor);
297299
when(threadPool.executor(eq(ThreadPool.Names.SYSTEM_WRITE))).thenReturn(systemWriteExecutor);
298300
MockitoAnnotations.openMocks(this);

0 commit comments

Comments
 (0)