From 68ead2af851ef59550a552c162d15b83f98a6a7a Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Thu, 3 Mar 2022 08:59:19 +0100 Subject: [PATCH] Upgrade to Maven Surefire Plugin 2.2.22 This commit also polishes the build as "Tests" is a pattern that is recognized automatically. This revealed a number of test classes that did not end with Tests and were not executed. --- pom.xml | 14 +------------ ...inaryExceptionClassifierBuilderTests.java} | 4 ++-- ...a => CircuitBreakerResetTimeoutTests.java} | 20 +++++++++++++++++-- ...a => UniformRandomBackOffPolicyTests.java} | 4 ++-- ...st.java => RetryTemplateBuilderTests.java} | 4 ++-- 5 files changed, 25 insertions(+), 21 deletions(-) rename src/test/java/org/springframework/classify/{BinaryExceptionClassifierBuilderTest.java => BinaryExceptionClassifierBuilderTests.java} (96%) rename src/test/java/org/springframework/retry/annotation/{CircuitBreakerResetTimeoutTest.java => CircuitBreakerResetTimeoutTests.java} (77%) rename src/test/java/org/springframework/retry/backoff/{UniformRandomBackOffPolicyTest.java => UniformRandomBackOffPolicyTests.java} (92%) rename src/test/java/org/springframework/retry/support/{RetryTemplateBuilderTest.java => RetryTemplateBuilderTests.java} (98%) diff --git a/pom.xml b/pom.xml index ddb24dd..a6d1710 100644 --- a/pom.xml +++ b/pom.xml @@ -258,7 +258,7 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.1 + 2.22.2 @@ -312,18 +312,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - - **/*Tests.java - - - **/Abstract*.java - - - diff --git a/src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTest.java b/src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTests.java similarity index 96% rename from src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTest.java rename to src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTests.java index 4f50b1f..4263497 100644 --- a/src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTest.java +++ b/src/test/java/org/springframework/classify/BinaryExceptionClassifierBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2006-2022 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. @@ -28,7 +28,7 @@ import org.springframework.retry.support.RetryTemplate; /** * @author Aleksandr Shamukov */ -public class BinaryExceptionClassifierBuilderTest { +public class BinaryExceptionClassifierBuilderTests { @Test public void testWhiteList() { diff --git a/src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTest.java b/src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTests.java similarity index 77% rename from src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTest.java rename to src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTests.java index 203f961..405565d 100644 --- a/src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTest.java +++ b/src/test/java/org/springframework/retry/annotation/CircuitBreakerResetTimeoutTests.java @@ -1,3 +1,19 @@ +/* + * Copyright 2006-2022 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. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.springframework.retry.annotation; import static org.junit.Assert.assertFalse; @@ -10,10 +26,10 @@ import org.springframework.retry.RetryContext; import org.springframework.retry.policy.CircuitBreakerRetryPolicy; import org.springframework.retry.support.RetrySynchronizationManager; -public class CircuitBreakerResetTimeoutTest { +public class CircuitBreakerResetTimeoutTests { private AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext( - CircuitBreakerResetTimeoutTest.TestConfiguration.class); + CircuitBreakerResetTimeoutTests.TestConfiguration.class); private TestService serviceInTest = context.getBean(TestService.class); diff --git a/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTest.java b/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java similarity index 92% rename from src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTest.java rename to src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java index dc55cf7..d3922bb 100644 --- a/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTest.java +++ b/src/test/java/org/springframework/retry/backoff/UniformRandomBackOffPolicyTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2021 the original author or authors. + * Copyright 2006-2022 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. @@ -24,7 +24,7 @@ import org.junit.Test; * @author Tomaz Fernandes * @since 1.3.2 */ -public class UniformRandomBackOffPolicyTest { +public class UniformRandomBackOffPolicyTests { @Test public void testSetSleeper() { diff --git a/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java b/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTests.java similarity index 98% rename from src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java rename to src/test/java/org/springframework/retry/support/RetryTemplateBuilderTests.java index 13019e4..b91ae70 100644 --- a/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTest.java +++ b/src/test/java/org/springframework/retry/support/RetryTemplateBuilderTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2019 the original author or authors. + * Copyright 2006-2022 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. @@ -52,7 +52,7 @@ import static org.springframework.retry.util.test.TestUtils.getPropertyValue; * @author Aleksandr Shamukov * @author Kim In Hoi */ -public class RetryTemplateBuilderTest { +public class RetryTemplateBuilderTests { /* ---------------- Mixed tests -------------- */