mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Polish
See gh-27418
This commit is contained in:
parent
c8c1452ced
commit
734293d491
@ -185,7 +185,6 @@ class MetricsRestTemplateCustomizerTests {
|
|||||||
assertThat(restTemplate.getForObject(URI.create("/second/456"), String.class)).isEqualTo("OK");
|
assertThat(restTemplate.getForObject(URI.create("/second/456"), String.class)).isEqualTo("OK");
|
||||||
this.registry.get("http.client.requests").tags("uri", "/second/456").timer();
|
this.registry.get("http.client.requests").tags("uri", "/second/456").timer();
|
||||||
this.mockServer.verify();
|
this.mockServer.verify();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final class TestInterceptor implements ClientHttpRequestInterceptor {
|
private static final class TestInterceptor implements ClientHttpRequestInterceptor {
|
||||||
|
@ -142,7 +142,7 @@ class MetricsWebFilterTests {
|
|||||||
|
|
||||||
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
|
class FaultyWebFluxTagsProvider extends DefaultWebFluxTagsProvider {
|
||||||
|
|
||||||
private volatile AtomicBoolean fail = new AtomicBoolean(false);
|
private final AtomicBoolean fail = new AtomicBoolean(false);
|
||||||
|
|
||||||
FaultyWebFluxTagsProvider() {
|
FaultyWebFluxTagsProvider() {
|
||||||
super(true);
|
super(true);
|
||||||
|
@ -31,7 +31,7 @@ import io.micrometer.core.instrument.Tag;
|
|||||||
*/
|
*/
|
||||||
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
|
class FaultyWebMvcTagsProvider extends DefaultWebMvcTagsProvider {
|
||||||
|
|
||||||
private volatile AtomicBoolean fail = new AtomicBoolean(false);
|
private final AtomicBoolean fail = new AtomicBoolean(false);
|
||||||
|
|
||||||
FaultyWebMvcTagsProvider() {
|
FaultyWebMvcTagsProvider() {
|
||||||
super(true);
|
super(true);
|
||||||
|
@ -100,7 +100,7 @@ public class SpringApplicationBuilder {
|
|||||||
/**
|
/**
|
||||||
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the
|
* Creates a new {@link org.springframework.boot.SpringApplication} instances from the
|
||||||
* given sources. Subclasses may override in order to provide a custom subclass of
|
* given sources. Subclasses may override in order to provide a custom subclass of
|
||||||
* {@link org.springframework.boot.SpringApplication}
|
* {@link org.springframework.boot.SpringApplication}.
|
||||||
* @param sources the sources
|
* @param sources the sources
|
||||||
* @return the {@link org.springframework.boot.SpringApplication} instance
|
* @return the {@link org.springframework.boot.SpringApplication} instance
|
||||||
* @since 1.1.0
|
* @since 1.1.0
|
||||||
|
@ -123,7 +123,7 @@ class RandomValuePropertySourceTests {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void longRangeWhenLowerBoundNegativeShouldFailWithIllegalArgumentException() {
|
void longRangeWhenLowerBoundNegative() {
|
||||||
Long value = (Long) this.source.getProperty("random.long[-4,4]");
|
Long value = (Long) this.source.getProperty("random.long[-4,4]");
|
||||||
assertThat(value >= -4).isTrue();
|
assertThat(value >= -4).isTrue();
|
||||||
assertThat(value < 4).isTrue();
|
assertThat(value < 4).isTrue();
|
||||||
|
@ -20,7 +20,6 @@ import org.junit.jupiter.api.Test;
|
|||||||
|
|
||||||
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.context.ApplicationContext;
|
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||||
|
|
||||||
@ -36,9 +35,6 @@ class CorsSampleActuatorApplicationTests {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private WebTestClient webClient;
|
private WebTestClient webClient;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private ApplicationContext applicationContext;
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void endpointShouldReturnUnauthorized() {
|
void endpointShouldReturnUnauthorized() {
|
||||||
this.webClient.get().uri("/actuator/env").exchange().expectStatus().isUnauthorized();
|
this.webClient.get().uri("/actuator/env").exchange().expectStatus().isUnauthorized();
|
||||||
|
Loading…
Reference in New Issue
Block a user