Commit 91e38569 authored by Stephane Nicoll's avatar Stephane Nicoll

Polish

parent 2cd74e4a
...@@ -33,7 +33,7 @@ public class TaskProperties { ...@@ -33,7 +33,7 @@ public class TaskProperties {
/** /**
* Prefix to use for the names of newly created threads. * Prefix to use for the names of newly created threads.
*/ */
private String threadNamePrefix = "executor-"; private String threadNamePrefix = "task-";
public Pool getPool() { public Pool getPool() {
return this.pool; return this.pool;
......
...@@ -132,14 +132,13 @@ public class TaskExecutorAutoConfigurationTests { ...@@ -132,14 +132,13 @@ public class TaskExecutorAutoConfigurationTests {
@Test @Test
public void enableAsyncUsesAutoConfiguredOneByDefault() { public void enableAsyncUsesAutoConfiguredOneByDefault() {
this.contextRunner this.contextRunner.withPropertyValues("spring.task.thread-name-prefix=task-test-")
.withPropertyValues("spring.task.thread-name-prefix=executor-test-")
.withUserConfiguration(AsyncConfiguration.class, TestBean.class) .withUserConfiguration(AsyncConfiguration.class, TestBean.class)
.run((context) -> { .run((context) -> {
assertThat(context).hasSingleBean(TaskExecutor.class); assertThat(context).hasSingleBean(TaskExecutor.class);
TestBean bean = context.getBean(TestBean.class); TestBean bean = context.getBean(TestBean.class);
String text = bean.echo("something").get(); 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. ...@@ -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.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.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.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 # WEB PROPERTIES
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment