From a039f6328dd7ac4e6dd80ed10983abda2d096e8e Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 20 Feb 2020 13:35:02 +0100 Subject: [PATCH] Start building against Spring Framework 5.2.4 snapshots See gh-20240 --- .../task/TaskExecutionAutoConfigurationTests.java | 2 +- .../task/TaskSchedulingAutoConfigurationTests.java | 4 ++-- spring-boot-project/spring-boot-dependencies/build.gradle | 2 +- .../boot/task/TaskExecutorBuilderTests.java | 5 +++-- .../boot/task/TaskSchedulerBuilderTests.java | 7 ++++--- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfigurationTests.java index fe440a6139..a0bb9642a2 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskExecutionAutoConfigurationTests.java @@ -72,7 +72,7 @@ class TaskExecutionAutoConfigurationTests { assertThat(taskExecutor).hasFieldOrPropertyWithValue("allowCoreThreadTimeOut", true); assertThat(taskExecutor.getKeepAliveSeconds()).isEqualTo(5); assertThat(taskExecutor).hasFieldOrPropertyWithValue("waitForTasksToCompleteOnShutdown", true); - assertThat(taskExecutor).hasFieldOrPropertyWithValue("awaitTerminationSeconds", 30); + assertThat(taskExecutor).hasFieldOrPropertyWithValue("awaitTerminationMillis", 30000L); assertThat(taskExecutor.getThreadNamePrefix()).isEqualTo("mytest-"); })); } diff --git a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfigurationTests.java b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfigurationTests.java index 3dd530e16c..ac8ef5c487 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfigurationTests.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/task/TaskSchedulingAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -68,7 +68,7 @@ class TaskSchedulingAutoConfigurationTests { TestBean bean = context.getBean(TestBean.class); assertThat(bean.latch.await(30, TimeUnit.SECONDS)).isTrue(); assertThat(taskExecutor).hasFieldOrPropertyWithValue("waitForTasksToCompleteOnShutdown", true); - assertThat(taskExecutor).hasFieldOrPropertyWithValue("awaitTerminationSeconds", 30); + assertThat(taskExecutor).hasFieldOrPropertyWithValue("awaitTerminationMillis", 30000L); assertThat(bean.threadNames).allMatch((name) -> name.contains("scheduling-test-")); }); } diff --git a/spring-boot-project/spring-boot-dependencies/build.gradle b/spring-boot-project/spring-boot-dependencies/build.gradle index 750c60759d..b8b488a2cf 100644 --- a/spring-boot-project/spring-boot-dependencies/build.gradle +++ b/spring-boot-project/spring-boot-dependencies/build.gradle @@ -1617,7 +1617,7 @@ bom { ] } } - library("Spring Framework", "5.2.3.RELEASE") { + library("Spring Framework", "5.2.4.BUILD-SNAPSHOT") { group("org.springframework") { imports = [ "spring-framework-bom" diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java index ca4675ccce..41bc48a1fe 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskExecutorBuilderTests.java @@ -61,8 +61,9 @@ class TaskExecutorBuilderTests { @Test void awaitTerminationPeriodShouldApply() { - ThreadPoolTaskExecutor executor = this.builder.awaitTerminationPeriod(Duration.ofMinutes(1)).build(); - assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationSeconds", 60); + Duration period = Duration.ofMinutes(1); + ThreadPoolTaskExecutor executor = this.builder.awaitTerminationPeriod(period).build(); + assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis()); } @Test diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java index e1363bc5cd..46bb185a10 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/task/TaskSchedulerBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2019 the original author or authors. + * Copyright 2012-2020 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -54,8 +54,9 @@ class TaskSchedulerBuilderTests { @Test void awaitTerminationPeriodShouldApply() { - ThreadPoolTaskScheduler executor = this.builder.awaitTerminationPeriod(Duration.ofMinutes(1)).build(); - assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationSeconds", 60); + Duration period = Duration.ofMinutes(1); + ThreadPoolTaskScheduler executor = this.builder.awaitTerminationPeriod(period).build(); + assertThat(executor).hasFieldOrPropertyWithValue("awaitTerminationMillis", period.toMillis()); } @Test