Skip to content

Commit

Permalink
Make sure DefaultAsyncTaskExecutor is started
Browse files Browse the repository at this point in the history
  • Loading branch information
svenrienstra authored and filiphr committed Jun 11, 2024
1 parent 473fc25 commit 03d8680
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ public AsyncTaskExecutorConfiguration flowableAsyncTaskInvokerTaskExecutorConfig
public AsyncTaskExecutor flowableAsyncTaskInvokerTaskExecutor(
@Qualifier("flowableAsyncTaskInvokerTaskExecutorConfiguration") AsyncTaskExecutorConfiguration executorConfiguration
) {
return new DefaultAsyncTaskExecutor(executorConfiguration);
DefaultAsyncTaskExecutor defaultAsyncTaskExecutor = new DefaultAsyncTaskExecutor(executorConfiguration);
defaultAsyncTaskExecutor.start();
return defaultAsyncTaskExecutor;
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,7 @@ void processEngineShouldUseSpringTaskExecutor() {
assertThat(taskExecutor.getMaxPoolSize()).isEqualTo(8);
assertThat(taskExecutor.getQueueSize()).isEqualTo(100);
assertThat(taskExecutor.getThreadPoolNamingPattern()).isEqualTo("flowable-async-task-invoker-%d");
assertThat(taskExecutor.submit(() -> true).join()).isTrue();
});
});
}
Expand Down

0 comments on commit 03d8680

Please sign in to comment.