Upgrade tests to Junit5

See gh-14737
pull/15421/head
Madhura Bhave 6 years ago
parent 4c96c76f11
commit 59d2b0a3fb

@ -153,6 +153,14 @@
<enabled>true</enabled> <enabled>true</enabled>
</snapshots> </snapshots>
</repository> </repository>
<repository>
<id>junit-snapshot</id>
<name>Junit Snapshot</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository> <repository>
<id>rabbit-milestone</id> <id>rabbit-milestone</id>
<name>Rabbit Milestone</name> <name>Rabbit Milestone</name>

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure; package org.springframework.boot.actuate.autoconfigure;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@ -46,7 +46,7 @@ public class SpringApplicationHierarchyTests {
private ConfigurableApplicationContext context; private ConfigurableApplicationContext context;
@After @AfterEach
public void after() { public void after() {
ApplicationContextTestUtils.closeAll(this.context); ApplicationContextTestUtils.closeAll(this.context);
} }

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.amqp; package org.springframework.boot.actuate.autoconfigure.amqp;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.amqp.RabbitHealthIndicator; import org.springframework.boot.actuate.amqp.RabbitHealthIndicator;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.audit; package org.springframework.boot.actuate.autoconfigure.audit;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository; import org.springframework.boot.actuate.audit.AuditEventRepository;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.audit; package org.springframework.boot.actuate.autoconfigure.audit;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.audit.AuditEventsEndpoint; import org.springframework.boot.actuate.audit.AuditEventsEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.beans; package org.springframework.boot.actuate.autoconfigure.beans;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.beans.BeansEndpoint; import org.springframework.boot.actuate.beans.BeansEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cache; package org.springframework.boot.actuate.autoconfigure.cache;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.cache.CachesEndpoint; import org.springframework.boot.actuate.cache.CachesEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cassandra; package org.springframework.boot.actuate.autoconfigure.cassandra;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.cassandra.CassandraHealthIndicator; import org.springframework.boot.actuate.cassandra.CassandraHealthIndicator;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cassandra; package org.springframework.boot.actuate.autoconfigure.cassandra;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.cassandra.CassandraHealthIndicator; import org.springframework.boot.actuate.cassandra.CassandraHealthIndicator;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry; package org.springframework.boot.actuate.autoconfigure.cloudfoundry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry; package org.springframework.boot.actuate.autoconfigure.cloudfoundry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException.Reason; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException.Reason;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry; package org.springframework.boot.actuate.autoconfigure.cloudfoundry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint; import org.springframework.boot.actuate.endpoint.annotation.DiscoveredEndpoint;

@ -21,7 +21,7 @@ import java.util.Collections;
import java.util.function.Consumer; import java.util.function.Consumer;
import java.util.function.Function; import java.util.function.Function;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.EndpointId; import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.boot.actuate.endpoint.InvocationContext; import org.springframework.boot.actuate.endpoint.InvocationContext;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.cloudfoundry;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException.Reason; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException.Reason;
import org.springframework.util.Base64Utils; import org.springframework.util.Base64Utils;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive; package org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;

@ -21,7 +21,7 @@ import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.junit.Test; import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel;

@ -23,8 +23,8 @@ import java.util.stream.Collectors;
import javax.net.ssl.SSLException; import javax.net.ssl.SSLException;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import reactor.netty.http.HttpResources; import reactor.netty.http.HttpResources;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
@ -88,7 +88,7 @@ public class ReactiveCloudFoundryActuatorAutoConfigurationTests {
HealthEndpointAutoConfiguration.class, HealthEndpointAutoConfiguration.class,
ReactiveCloudFoundryActuatorAutoConfiguration.class)); ReactiveCloudFoundryActuatorAutoConfiguration.class));
@After @AfterEach
public void close() { public void close() {
HttpResources.reset(); HttpResources.reset();
} }

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive; package org.springframework.boot.actuate.autoconfigure.cloudfoundry.reactive;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@ -51,7 +51,7 @@ public class ReactiveCloudFoundrySecurityInterceptorTests {
private CloudFoundrySecurityInterceptor interceptor; private CloudFoundrySecurityInterceptor interceptor;
@Before @BeforeEach
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator, this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator,

@ -21,9 +21,9 @@ import java.util.function.Consumer;
import okhttp3.mockwebserver.MockResponse; import okhttp3.mockwebserver.MockResponse;
import okhttp3.mockwebserver.MockWebServer; import okhttp3.mockwebserver.MockWebServer;
import okhttp3.mockwebserver.RecordedRequest; import okhttp3.mockwebserver.RecordedRequest;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import reactor.test.StepVerifier; import reactor.test.StepVerifier;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel;
@ -54,7 +54,7 @@ public class ReactiveCloudFoundrySecurityServiceTests {
private WebClient.Builder builder; private WebClient.Builder builder;
@Before @BeforeEach
public void setup() { public void setup() {
this.server = new MockWebServer(); this.server = new MockWebServer();
this.builder = WebClient.builder().baseUrl(this.server.url("/").toString()); this.builder = WebClient.builder().baseUrl(this.server.url("/").toString());
@ -62,7 +62,7 @@ public class ReactiveCloudFoundrySecurityServiceTests {
CLOUD_CONTROLLER, false); CLOUD_CONTROLLER, false);
} }
@After @AfterEach
public void shutdown() throws Exception { public void shutdown() throws Exception {
this.server.shutdown(); this.server.shutdown();
} }

@ -29,8 +29,8 @@ import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@ -83,7 +83,7 @@ public class ReactiveTokenValidatorTests {
private static final Map<String, String> VALID_KEYS = new ConcurrentHashMap<>(); private static final Map<String, String> VALID_KEYS = new ConcurrentHashMap<>();
@Before @BeforeEach
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
VALID_KEYS.put("valid-key", VALID_KEY); VALID_KEYS.put("valid-key", VALID_KEY);

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet; package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;

@ -22,7 +22,7 @@ import java.util.Map;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException;

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet; package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.mockito.ArgumentCaptor; import org.mockito.ArgumentCaptor;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@ -53,7 +53,7 @@ public class CloudFoundrySecurityInterceptorTests {
private MockHttpServletRequest request; private MockHttpServletRequest request;
@Before @BeforeEach
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator, this.interceptor = new CloudFoundrySecurityInterceptor(this.tokenValidator,

@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.AccessLevel;
import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException; import org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException;
@ -60,7 +60,7 @@ public class CloudFoundrySecurityServiceTests {
private MockRestServiceServer server; private MockRestServiceServer server;
@Before @BeforeEach
public void setup() { public void setup() {
MockServerRestTemplateCustomizer mockServerCustomizer = new MockServerRestTemplateCustomizer(); MockServerRestTemplateCustomizer mockServerCustomizer = new MockServerRestTemplateCustomizer();
RestTemplateBuilder builder = new RestTemplateBuilder(mockServerCustomizer); RestTemplateBuilder builder = new RestTemplateBuilder(mockServerCustomizer);

@ -18,8 +18,8 @@ package org.springframework.boot.actuate.autoconfigure.cloudfoundry.servlet;
import javax.net.ssl.SSLHandshakeException; import javax.net.ssl.SSLHandshakeException;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.testsupport.web.servlet.ExampleServlet; import org.springframework.boot.testsupport.web.servlet.ExampleServlet;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory; import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
@ -41,7 +41,7 @@ public class SkipSslVerificationHttpRequestFactoryTests {
private WebServer webServer; private WebServer webServer;
@After @AfterEach
public void shutdownContainer() { public void shutdownContainer() {
if (this.webServer != null) { if (this.webServer != null) {
this.webServer.stop(); this.webServer.stop();

@ -29,8 +29,8 @@ import java.util.Collections;
import java.util.Map; import java.util.Map;
import java.util.function.Consumer; import java.util.function.Consumer;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.mockito.Mock; import org.mockito.Mock;
import org.mockito.Mockito; import org.mockito.Mockito;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
@ -85,7 +85,7 @@ public class TokenValidatorTests {
private static final Map<String, String> VALID_KEYS = Collections private static final Map<String, String> VALID_KEYS = Collections
.singletonMap("valid-key", VALID_KEY); .singletonMap("valid-key", VALID_KEY);
@Before @BeforeEach
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
this.tokenValidator = new TokenValidator(this.securityService); this.tokenValidator = new TokenValidator(this.securityService);

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.condition; package org.springframework.boot.actuate.autoconfigure.condition;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.boot.test.context.runner.ApplicationContextRunner;

@ -21,7 +21,7 @@ import java.util.Collections;
import javax.annotation.PostConstruct; import javax.annotation.PostConstruct;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint.ContextConditionEvaluation; import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint.ContextConditionEvaluation;
import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport; import org.springframework.boot.autoconfigure.condition.ConditionEvaluationReport;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.context; package org.springframework.boot.actuate.autoconfigure.context;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.context.ShutdownEndpoint; import org.springframework.boot.actuate.context.ShutdownEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.context.properties;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint; import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint;
import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties; import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint.ApplicationConfigurationProperties;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.couchbase; package org.springframework.boot.actuate.autoconfigure.couchbase;
import com.couchbase.client.java.Cluster; import com.couchbase.client.java.Cluster;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator; import org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.couchbase; package org.springframework.boot.actuate.autoconfigure.couchbase;
import com.couchbase.client.java.Cluster; import com.couchbase.client.java.Cluster;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator; import org.springframework.boot.actuate.couchbase.CouchbaseHealthIndicator;

@ -17,7 +17,7 @@
package org.springframework.boot.actuate.autoconfigure.elasticsearch; package org.springframework.boot.actuate.autoconfigure.elasticsearch;
import io.searchbox.client.JestClient; import io.searchbox.client.JestClient;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.elasticsearch.ElasticsearchHealthIndicator; import org.springframework.boot.actuate.elasticsearch.ElasticsearchHealthIndicator;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint;
import java.util.function.Function; import java.util.function.Function;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.EndpointId; import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.mock.env.MockEnvironment; import org.springframework.mock.env.MockEnvironment;

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.endpoint; package org.springframework.boot.actuate.autoconfigure.endpoint;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.mockito.MockitoAnnotations; import org.mockito.MockitoAnnotations;
import org.springframework.boot.actuate.endpoint.EndpointFilter; import org.springframework.boot.actuate.endpoint.EndpointFilter;
@ -40,7 +40,7 @@ public class ExposeExcludePropertyEndpointFilterTests {
private ExposeExcludePropertyEndpointFilter<?> filter; private ExposeExcludePropertyEndpointFilter<?> filter;
@Before @BeforeEach
public void setup() { public void setup() {
MockitoAnnotations.initMocks(this); MockitoAnnotations.initMocks(this);
} }

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.condition; package org.springframework.boot.actuate.autoconfigure.endpoint.condition;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.EndpointFilter; import org.springframework.boot.actuate.endpoint.EndpointFilter;
import org.springframework.boot.actuate.endpoint.ExposableEndpoint; import org.springframework.boot.actuate.endpoint.ExposableEndpoint;

@ -22,7 +22,7 @@ import javax.management.MBeanServer;
import javax.management.MalformedObjectNameException; import javax.management.MalformedObjectNameException;
import javax.management.ObjectName; import javax.management.ObjectName;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.EndpointId; import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.boot.actuate.endpoint.jmx.ExposableJmxEndpoint; import org.springframework.boot.actuate.endpoint.jmx.ExposableJmxEndpoint;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web;
import java.util.Collections; import java.util.Collections;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.EndpointId; import org.springframework.boot.actuate.endpoint.EndpointId;
import org.springframework.boot.actuate.endpoint.web.PathMapper; import org.springframework.boot.actuate.endpoint.web.PathMapper;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web;
import java.util.Collections; import java.util.Collections;
import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ResourceConfig;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar; import org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar;
import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier; import org.springframework.boot.actuate.endpoint.web.annotation.ServletEndpointsSupplier;

@ -21,7 +21,7 @@ import java.util.Collection;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.ExposeExcludePropertyEndpointFilter; import org.springframework.boot.actuate.autoconfigure.endpoint.ExposeExcludePropertyEndpointFilter;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web; package org.springframework.boot.actuate.autoconfigure.endpoint.web;
import org.junit.Test; import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException; import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;

@ -21,7 +21,7 @@ import java.time.format.DateTimeFormatter;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.audit.AuditEvent; import org.springframework.boot.actuate.audit.AuditEvent;
import org.springframework.boot.actuate.audit.AuditEventRepository; import org.springframework.boot.actuate.audit.AuditEventRepository;

@ -22,7 +22,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.beans.BeansEndpoint; import org.springframework.boot.actuate.beans.BeansEndpoint;
import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.ConfigurableApplicationContext;

@ -22,7 +22,7 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.cache.CachesEndpoint; import org.springframework.boot.actuate.cache.CachesEndpoint;
import org.springframework.boot.actuate.cache.CachesEndpointWebExtension; import org.springframework.boot.actuate.cache.CachesEndpointWebExtension;

@ -19,9 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentatio
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Rule; import org.junit.jupiter.api.Test;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint; import org.springframework.boot.actuate.autoconfigure.condition.ConditionsReportEndpoint;
@ -31,7 +30,7 @@ import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation; import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation;
import org.springframework.restdocs.payload.FieldDescriptor; import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.restdocs.payload.JsonFieldType;
@ -53,20 +52,17 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
public class ConditionsReportEndpointDocumentationTests public class ConditionsReportEndpointDocumentationTests
extends MockMvcEndpointDocumentationTests { extends MockMvcEndpointDocumentationTests {
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
private MockMvc mockMvc; private MockMvc mockMvc;
@Autowired @Autowired
private WebApplicationContext applicationContext; private WebApplicationContext applicationContext;
@Override @Override
@Before @BeforeEach
public void before() { public void setup(RestDocumentationContextProvider restDocumentation) {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext) this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext)
.apply(MockMvcRestDocumentation .apply(MockMvcRestDocumentation
.documentationConfiguration(this.restDocumentation).uris()) .documentationConfiguration(restDocumentation).uris())
.build(); .build();
} }

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint; import org.springframework.boot.actuate.context.properties.ConfigurationPropertiesReportEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -25,7 +25,7 @@ import java.util.stream.Collectors;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializationFeature;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.env.EnvironmentEndpoint; import org.springframework.boot.actuate.env.EnvironmentEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -23,7 +23,7 @@ import javax.sql.DataSource;
import org.flywaydb.core.api.MigrationState; import org.flywaydb.core.api.MigrationState;
import org.flywaydb.core.api.MigrationType; import org.flywaydb.core.api.MigrationType;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.flyway.FlywayEndpoint; import org.springframework.boot.actuate.flyway.FlywayEndpoint;
import org.springframework.boot.autoconfigure.ImportAutoConfiguration; import org.springframework.boot.autoconfigure.ImportAutoConfiguration;

@ -24,7 +24,7 @@ import java.util.Map;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.health.CompositeHealthIndicator; import org.springframework.boot.actuate.health.CompositeHealthIndicator;
import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Health;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentatio
import java.io.FileWriter; import java.io.FileWriter;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.management.HeapDumpWebEndpoint; import org.springframework.boot.actuate.management.HeapDumpWebEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -23,7 +23,7 @@ import java.util.Collections;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.UUID; import java.util.UUID;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.trace.http.HttpExchangeTracer; import org.springframework.boot.actuate.trace.http.HttpExchangeTracer;
import org.springframework.boot.actuate.trace.http.HttpTrace; import org.springframework.boot.actuate.trace.http.HttpTrace;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentatio
import java.util.List; import java.util.List;
import java.util.Properties; import java.util.Properties;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.info.BuildInfoContributor; import org.springframework.boot.actuate.info.BuildInfoContributor;
import org.springframework.boot.actuate.info.GitInfoContributor; import org.springframework.boot.actuate.info.GitInfoContributor;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint; import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -20,7 +20,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import liquibase.changelog.ChangeSet.ExecType; import liquibase.changelog.ChangeSet.ExecType;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.liquibase.LiquibaseEndpoint; import org.springframework.boot.actuate.liquibase.LiquibaseEndpoint;
import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration; import org.springframework.boot.autoconfigure.jdbc.EmbeddedDataSourceConfiguration;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.logging.LogFileWebEndpoint; import org.springframework.boot.actuate.logging.LogFileWebEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -20,7 +20,7 @@ import java.util.Arrays;
import java.util.EnumSet; import java.util.EnumSet;
import java.util.List; import java.util.List;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.logging.LoggersEndpoint; import org.springframework.boot.actuate.logging.LoggersEndpoint;
import org.springframework.boot.logging.LogLevel; import org.springframework.boot.logging.LogLevel;

@ -21,10 +21,9 @@ import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Rule; import org.junit.jupiter.api.Test;
import org.junit.Test; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider; import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint; import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
@ -38,10 +37,10 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.RestDocumentationExtension;
import org.springframework.restdocs.payload.FieldDescriptor; import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.restdocs.payload.JsonFieldType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -61,23 +60,20 @@ import static org.springframework.web.reactive.function.server.RouterFunctions.r
* *
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringRunner.class) @ExtendWith(RestDocumentationExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.main.web-application-type=reactive") @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "spring.main.web-application-type=reactive")
public class MappingsEndpointReactiveDocumentationTests public class MappingsEndpointReactiveDocumentationTests
extends AbstractEndpointDocumentationTests { extends AbstractEndpointDocumentationTests {
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
@LocalServerPort @LocalServerPort
private int port; private int port;
private WebTestClient client; private WebTestClient client;
@Before @BeforeEach
public void webTestClient() { public void webTestClient(RestDocumentationContextProvider restDocumentation) {
this.client = WebTestClient this.client = WebTestClient
.bindToServer().filter(documentationConfiguration(this.restDocumentation) .bindToServer().filter(documentationConfiguration(restDocumentation)
.snippets().withDefaults()) .snippets().withDefaults())
.baseUrl("http://localhost:" + this.port).build(); .baseUrl("http://localhost:" + this.port).build();
} }

@ -21,10 +21,9 @@ import java.util.Arrays;
import java.util.Collection; import java.util.Collection;
import java.util.List; import java.util.List;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Rule; import org.junit.jupiter.api.Test;
import org.junit.Test; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;
import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider; import org.springframework.boot.actuate.web.mappings.MappingDescriptionProvider;
import org.springframework.boot.actuate.web.mappings.MappingsEndpoint; import org.springframework.boot.actuate.web.mappings.MappingsEndpoint;
@ -40,11 +39,11 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import; import org.springframework.context.annotation.Import;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.RestDocumentationExtension;
import org.springframework.restdocs.payload.FieldDescriptor; import org.springframework.restdocs.payload.FieldDescriptor;
import org.springframework.restdocs.payload.JsonFieldType; import org.springframework.restdocs.payload.JsonFieldType;
import org.springframework.restdocs.payload.ResponseFieldsSnippet; import org.springframework.restdocs.payload.ResponseFieldsSnippet;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -61,23 +60,20 @@ import static org.springframework.restdocs.webtestclient.WebTestClientRestDocume
* *
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringRunner.class) @ExtendWith(RestDocumentationExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
public class MappingsEndpointServletDocumentationTests public class MappingsEndpointServletDocumentationTests
extends AbstractEndpointDocumentationTests { extends AbstractEndpointDocumentationTests {
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
@LocalServerPort @LocalServerPort
private int port; private int port;
private WebTestClient client; private WebTestClient client;
@Before @BeforeEach
public void webTestClient() { public void webTestClient(RestDocumentationContextProvider restDocumentation) {
this.client = WebTestClient.bindToServer() this.client = WebTestClient.bindToServer()
.filter(documentationConfiguration(this.restDocumentation)) .filter(documentationConfiguration(restDocumentation))
.baseUrl("http://localhost:" + this.port).build(); .baseUrl("http://localhost:" + this.port).build();
} }

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentatio
import io.micrometer.core.instrument.Statistic; import io.micrometer.core.instrument.Statistic;
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics; import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry; import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.metrics.MetricsEndpoint; import org.springframework.boot.actuate.metrics.MetricsEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -16,15 +16,14 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Rule; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.restdocs.JUnitRestDocumentation; import org.springframework.restdocs.RestDocumentationContextProvider;
import org.springframework.restdocs.RestDocumentationExtension;
import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation; import org.springframework.restdocs.mockmvc.MockMvcRestDocumentation;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
@ -35,24 +34,21 @@ import org.springframework.web.context.WebApplicationContext;
* *
* @author Andy Wilkinson * @author Andy Wilkinson
*/ */
@RunWith(SpringRunner.class) @ExtendWith({ RestDocumentationExtension.class })
@SpringBootTest @SpringBootTest
public abstract class MockMvcEndpointDocumentationTests public abstract class MockMvcEndpointDocumentationTests
extends AbstractEndpointDocumentationTests { extends AbstractEndpointDocumentationTests {
@Rule
public final JUnitRestDocumentation restDocumentation = new JUnitRestDocumentation();
protected MockMvc mockMvc; protected MockMvc mockMvc;
@Autowired @Autowired
private WebApplicationContext applicationContext; private WebApplicationContext applicationContext;
@Before @BeforeEach
public void before() { public void setup(RestDocumentationContextProvider restDocumentation) {
this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext) this.mockMvc = MockMvcBuilders.webAppContextSetup(this.applicationContext)
.apply(MockMvcRestDocumentation .apply(MockMvcRestDocumentation
.documentationConfiguration(this.restDocumentation).uris()) .documentationConfiguration(restDocumentation).uris())
.build(); .build();
} }

@ -21,7 +21,7 @@ import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
import io.micrometer.prometheus.PrometheusConfig; import io.micrometer.prometheus.PrometheusConfig;
import io.micrometer.prometheus.PrometheusMeterRegistry; import io.micrometer.prometheus.PrometheusMeterRegistry;
import io.prometheus.client.CollectorRegistry; import io.prometheus.client.CollectorRegistry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint; import org.springframework.boot.actuate.metrics.export.prometheus.PrometheusScrapeEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentatio
import java.util.Collection; import java.util.Collection;
import java.util.regex.Pattern; import java.util.regex.Pattern;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint; import org.springframework.boot.actuate.scheduling.ScheduledTasksEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -23,7 +23,7 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.UUID; import java.util.UUID;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.context.ShutdownEndpoint; import org.springframework.boot.actuate.context.ShutdownEndpoint;
import org.springframework.boot.actuate.session.SessionsEndpoint; import org.springframework.boot.actuate.session.SessionsEndpoint;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.context.ShutdownEndpoint; import org.springframework.boot.actuate.context.ShutdownEndpoint;
import org.springframework.context.annotation.AnnotationConfigApplicationContext; import org.springframework.context.annotation.AnnotationConfigApplicationContext;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation; package org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.management.ThreadDumpEndpoint; import org.springframework.boot.actuate.management.ThreadDumpEndpoint;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.endpoint.web.jersey;
import java.util.Collections; import java.util.Collections;
import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ResourceConfig;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier; import org.springframework.boot.actuate.endpoint.web.WebEndpointsSupplier;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.env;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.env.EnvironmentEndpoint; import org.springframework.boot.actuate.env.EnvironmentEndpoint;
import org.springframework.boot.actuate.env.EnvironmentEndpoint.EnvironmentDescriptor; import org.springframework.boot.actuate.env.EnvironmentEndpoint.EnvironmentDescriptor;

@ -17,7 +17,7 @@
package org.springframework.boot.actuate.autoconfigure.flyway; package org.springframework.boot.actuate.autoconfigure.flyway;
import org.flywaydb.core.Flyway; import org.flywaydb.core.Flyway;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.flyway.FlywayEndpoint; import org.springframework.boot.actuate.flyway.FlywayEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.health; package org.springframework.boot.actuate.autoconfigure.health;
import org.junit.Test; import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Health;

@ -20,7 +20,7 @@ import java.security.Principal;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.endpoint.SecurityContext; import org.springframework.boot.actuate.endpoint.SecurityContext;
import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse; import org.springframework.boot.actuate.endpoint.web.WebEndpointResponse;

@ -19,7 +19,7 @@ package org.springframework.boot.actuate.autoconfigure.health;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.Map; import java.util.Map;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;
import org.springframework.boot.actuate.health.Health; import org.springframework.boot.actuate.health.Health;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.health;
import java.security.Principal; import java.security.Principal;
import org.junit.Test; import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import org.springframework.boot.actuate.endpoint.SecurityContext; import org.springframework.boot.actuate.endpoint.SecurityContext;

@ -17,7 +17,7 @@
package org.springframework.boot.actuate.autoconfigure.influx; package org.springframework.boot.actuate.autoconfigure.influx;
import org.influxdb.InfluxDB; import org.influxdb.InfluxDB;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;

@ -19,8 +19,8 @@ package org.springframework.boot.actuate.autoconfigure.info;
import java.util.Map; import java.util.Map;
import java.util.Properties; import java.util.Properties;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.info.BuildInfoContributor; import org.springframework.boot.actuate.info.BuildInfoContributor;
import org.springframework.boot.actuate.info.GitInfoContributor; import org.springframework.boot.actuate.info.GitInfoContributor;
@ -44,7 +44,7 @@ public class InfoContributorAutoConfigurationTests {
private AnnotationConfigApplicationContext context; private AnnotationConfigApplicationContext context;
@After @AfterEach
public void close() { public void close() {
if (this.context != null) { if (this.context != null) {
this.context.close(); this.context.close();

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.info; package org.springframework.boot.actuate.autoconfigure.info;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.info.InfoEndpoint; import org.springframework.boot.actuate.info.InfoEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.integration; package org.springframework.boot.actuate.autoconfigure.integration;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint; import org.springframework.boot.actuate.integration.IntegrationGraphEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
@ -49,7 +49,7 @@ public class ControllerEndpointWebFluxIntegrationTests {
private AnnotationConfigReactiveWebApplicationContext context; private AnnotationConfigReactiveWebApplicationContext context;
@After @AfterEach
public void close() { public void close() {
TestSecurityContextHolder.clearContext(); TestSecurityContextHolder.clearContext();
this.context.close(); this.context.close();

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
@ -62,7 +62,7 @@ public class ControllerEndpointWebMvcIntegrationTests {
private AnnotationConfigWebApplicationContext context; private AnnotationConfigWebApplicationContext context;
@After @AfterEach
public void close() { public void close() {
TestSecurityContextHolder.clearContext(); TestSecurityContextHolder.clearContext();
this.context.close(); this.context.close();

@ -17,7 +17,7 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.glassfish.jersey.server.ResourceConfig; import org.glassfish.jersey.server.ResourceConfig;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;

@ -24,7 +24,7 @@ import javax.management.MalformedObjectNameException;
import javax.management.ObjectName; import javax.management.ObjectName;
import javax.management.ReflectionException; import javax.management.ReflectionException;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.jmx.JmxEndpointAutoConfiguration;

@ -22,8 +22,8 @@ import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy; import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target; import java.lang.annotation.Target;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith; import org.junit.jupiter.api.extension.ExtendWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
@ -48,7 +48,7 @@ import org.springframework.context.annotation.Import;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.test.annotation.DirtiesContext; import org.springframework.test.annotation.DirtiesContext;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit.jupiter.SpringExtension;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
@ -57,7 +57,7 @@ import static org.assertj.core.api.Assertions.assertThat;
* *
* @author Stephane Nicoll * @author Stephane Nicoll
*/ */
@RunWith(SpringRunner.class) @ExtendWith(SpringExtension.class)
@SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "management.endpoints.web.exposure.include=jolokia") @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT, properties = "management.endpoints.web.exposure.include=jolokia")
@DirtiesContext @DirtiesContext
public class JolokiaEndpointAutoConfigurationIntegrationTests { public class JolokiaEndpointAutoConfigurationIntegrationTests {

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.SpringBootConfiguration; import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.metrics.MetricsAutoConfiguration;

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
@ -44,7 +44,7 @@ public class WebFluxEndpointCorsIntegrationTests {
private AnnotationConfigReactiveWebApplicationContext context; private AnnotationConfigReactiveWebApplicationContext context;
@Before @BeforeEach
public void createContext() { public void createContext() {
this.context = new AnnotationConfigReactiveWebApplicationContext(); this.context = new AnnotationConfigReactiveWebApplicationContext();
this.context.register(JacksonAutoConfiguration.class, this.context.register(JacksonAutoConfiguration.class,

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;

@ -16,8 +16,8 @@
package org.springframework.boot.actuate.autoconfigure.integrationtest; package org.springframework.boot.actuate.autoconfigure.integrationtest;
import org.junit.Before; import org.junit.jupiter.api.BeforeEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
@ -51,7 +51,7 @@ public class WebMvcEndpointCorsIntegrationTests {
private AnnotationConfigWebApplicationContext context; private AnnotationConfigWebApplicationContext context;
@Before @BeforeEach
public void createContext() { public void createContext() {
this.context = new AnnotationConfigWebApplicationContext(); this.context = new AnnotationConfigWebApplicationContext();
this.context.setServletContext(new MockServletContext()); this.context.setServletContext(new MockServletContext());

@ -24,7 +24,7 @@ import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;

@ -20,8 +20,8 @@ import java.util.function.Supplier;
import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServlet;
import org.junit.After; import org.junit.jupiter.api.AfterEach;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.audit.AuditAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.beans.BeansEndpointAutoConfiguration;
@ -72,7 +72,7 @@ public class WebMvcEndpointIntegrationTests {
private AnnotationConfigWebApplicationContext context; private AnnotationConfigWebApplicationContext context;
@After @AfterEach
public void close() { public void close() {
TestSecurityContextHolder.clearContext(); TestSecurityContextHolder.clearContext();
this.context.close(); this.context.close();

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.jdbc;
import javax.sql.DataSource; import javax.sql.DataSource;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.jms; package org.springframework.boot.actuate.autoconfigure.jms;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;

@ -20,7 +20,7 @@ import java.util.Collection;
import java.util.Collections; import java.util.Collections;
import org.jolokia.http.AgentServlet; import org.jolokia.http.AgentServlet;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration; import org.springframework.boot.actuate.autoconfigure.endpoint.web.ServletEndpointManagementContextConfiguration;
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.ldap; package org.springframework.boot.actuate.autoconfigure.ldap;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;

@ -18,7 +18,7 @@ package org.springframework.boot.actuate.autoconfigure.liquibase;
import liquibase.exception.LiquibaseException; import liquibase.exception.LiquibaseException;
import liquibase.integration.spring.SpringLiquibase; import liquibase.integration.spring.SpringLiquibase;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.liquibase.LiquibaseEndpoint; import org.springframework.boot.actuate.liquibase.LiquibaseEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -19,10 +19,11 @@ package org.springframework.boot.actuate.autoconfigure.logging;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Path;
import org.junit.Rule; import org.junit.jupiter.api.Test;
import org.junit.Test; import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.rules.TemporaryFolder; import org.junit.jupiter.api.support.io.TempDirectory;
import org.springframework.boot.actuate.logging.LogFileWebEndpoint; import org.springframework.boot.actuate.logging.LogFileWebEndpoint;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;
@ -40,11 +41,9 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb * @author Phillip Webb
* @author Christian Carriere-Tisseur * @author Christian Carriere-Tisseur
*/ */
@ExtendWith(TempDirectory.class)
public class LogFileWebEndpointAutoConfigurationTests { public class LogFileWebEndpointAutoConfigurationTests {
@Rule
public TemporaryFolder temp = new TemporaryFolder();
private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner() private WebApplicationContextRunner contextRunner = new WebApplicationContextRunner()
.withUserConfiguration(LogFileWebEndpointAutoConfiguration.class); .withUserConfiguration(LogFileWebEndpointAutoConfiguration.class);
@ -93,8 +92,9 @@ public class LogFileWebEndpointAutoConfigurationTests {
} }
@Test @Test
public void logFileWebEndpointUsesConfiguredExternalFile() throws IOException { public void logFileWebEndpointUsesConfiguredExternalFile(
File file = this.temp.newFile("logfile"); @TempDirectory.TempDir Path temp) throws IOException {
File file = new File(temp.toFile(), "logfile");
FileCopyUtils.copy("--TEST--".getBytes(), file); FileCopyUtils.copy("--TEST--".getBytes(), file);
this.contextRunner.withPropertyValues( this.contextRunner.withPropertyValues(
"management.endpoint.logfile.external-file:" + file.getAbsolutePath()) "management.endpoint.logfile.external-file:" + file.getAbsolutePath())

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.logging; package org.springframework.boot.actuate.autoconfigure.logging;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.logging.LoggersEndpoint; import org.springframework.boot.actuate.logging.LoggersEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.mail; package org.springframework.boot.actuate.autoconfigure.mail;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration; import org.springframework.boot.actuate.autoconfigure.health.HealthIndicatorAutoConfiguration;
import org.springframework.boot.actuate.health.ApplicationHealthIndicator; import org.springframework.boot.actuate.health.ApplicationHealthIndicator;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.management; package org.springframework.boot.actuate.autoconfigure.management;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.management.HeapDumpWebEndpoint; import org.springframework.boot.actuate.management.HeapDumpWebEndpoint;
import org.springframework.boot.test.context.runner.WebApplicationContextRunner; import org.springframework.boot.test.context.runner.WebApplicationContextRunner;

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.management; package org.springframework.boot.actuate.autoconfigure.management;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.management.ThreadDumpEndpoint; import org.springframework.boot.actuate.management.ThreadDumpEndpoint;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

@ -20,7 +20,7 @@ import io.micrometer.core.instrument.Clock;
import io.micrometer.core.instrument.MeterRegistry; import io.micrometer.core.instrument.MeterRegistry;
import io.micrometer.core.instrument.composite.CompositeMeterRegistry; import io.micrometer.core.instrument.composite.CompositeMeterRegistry;
import io.micrometer.core.instrument.simple.SimpleMeterRegistry; import io.micrometer.core.instrument.simple.SimpleMeterRegistry;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;

@ -20,7 +20,7 @@ import io.micrometer.core.instrument.binder.jvm.ClassLoaderMetrics;
import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics; import io.micrometer.core.instrument.binder.jvm.JvmGcMetrics;
import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics; import io.micrometer.core.instrument.binder.jvm.JvmMemoryMetrics;
import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics; import io.micrometer.core.instrument.binder.jvm.JvmThreadMetrics;
import org.junit.Test; import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun; import org.springframework.boot.actuate.autoconfigure.metrics.test.MetricsRun;
import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.AutoConfigurations;

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save