Polish
This commit is contained in:
@@ -33,7 +33,7 @@ public class TaskProperties {
|
||||
/**
|
||||
* Prefix to use for the names of newly created threads.
|
||||
*/
|
||||
private String threadNamePrefix = "executor-";
|
||||
private String threadNamePrefix = "task-";
|
||||
|
||||
public Pool getPool() {
|
||||
return this.pool;
|
||||
|
||||
@@ -132,14 +132,13 @@ public class TaskExecutorAutoConfigurationTests {
|
||||
|
||||
@Test
|
||||
public void enableAsyncUsesAutoConfiguredOneByDefault() {
|
||||
this.contextRunner
|
||||
.withPropertyValues("spring.task.thread-name-prefix=executor-test-")
|
||||
this.contextRunner.withPropertyValues("spring.task.thread-name-prefix=task-test-")
|
||||
.withUserConfiguration(AsyncConfiguration.class, TestBean.class)
|
||||
.run((context) -> {
|
||||
assertThat(context).hasSingleBean(TaskExecutor.class);
|
||||
TestBean bean = context.getBean(TestBean.class);
|
||||
String text = bean.echo("something").get();
|
||||
assertThat(text).contains("executor-test-").contains("something");
|
||||
assertThat(text).contains("task-test-").contains("something");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -167,7 +167,7 @@ content into your application. Rather, pick only the properties that you need.
|
||||
spring.task.pool.keep-alive=60s # Time limit for which threads may remain idle before being terminated.
|
||||
spring.task.pool.max-size= # Maximum allowed number of threads. If tasks are filling up the queue, the pool can expand up to that size to accommodate the load. Ignored if the queue is unbounded.
|
||||
spring.task.pool.queue-capacity= # Queue capacity. An unbounded capacity does not increase the pool and therefore ignores the "max-size" property.
|
||||
spring.task.thread-name-prefix=executor- # Prefix to use for the names of newly created threads.
|
||||
spring.task.thread-name-prefix=task # Prefix to use for the names of newly created threads.
|
||||
|
||||
# ----------------------------------------
|
||||
# WEB PROPERTIES
|
||||
|
||||
Reference in New Issue
Block a user