Skip to content

Commit dad6d4b

Browse files
committed
Merge branch '2.0.x'
2 parents cf7664c + 2b22b23 commit dad6d4b

File tree

3 files changed

+29
-12
lines changed

3 files changed

+29
-12
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsAutoConfigurationTests.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -143,12 +143,11 @@ public void longTaskTimingInterceptorIsRegistered() {
143143
this.contextRunner.withUserConfiguration(TestController.class)
144144
.withConfiguration(AutoConfigurations.of(MetricsAutoConfiguration.class,
145145
WebMvcAutoConfiguration.class))
146-
.run((context) -> {
147-
assertThat(context.getBean(RequestMappingHandlerMapping.class))
148-
.extracting("interceptors").element(0).asList()
149-
.extracting((item) -> (Class) item.getClass())
150-
.contains(LongTaskTimingHandlerInterceptor.class);
151-
});
146+
.run((context) -> assertThat(
147+
context.getBean(RequestMappingHandlerMapping.class))
148+
.extracting("interceptors").element(0).asList()
149+
.extracting((item) -> (Class) item.getClass())
150+
.contains(LongTaskTimingHandlerInterceptor.class));
152151
}
153152

154153
private MeterRegistry getInitializedMeterRegistry(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright 2012-2018 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
/**
18+
* Spring Boot specific {@link org.springframework.web.server.WebFilter} implementations.
19+
*/
20+
package org.springframework.boot.web.reactive.filter;

spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/embedded/tomcat/TomcatServletWebServerFactoryTests.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -432,9 +432,8 @@ public void exceptionThrownOnLoadFailureWhenFailCtxIfServletStartFailsIsTrue() {
432432
((StandardContext) context).setFailCtxIfServletStartFails(true);
433433
}
434434
});
435-
this.webServer = factory.getWebServer((context) -> {
436-
context.addServlet("failing", FailingServlet.class).setLoadOnStartup(0);
437-
});
435+
this.webServer = factory.getWebServer((context) -> context
436+
.addServlet("failing", FailingServlet.class).setLoadOnStartup(0));
438437
assertThatExceptionOfType(WebServerException.class)
439438
.isThrownBy(this.webServer::start);
440439
}
@@ -447,9 +446,8 @@ public void exceptionThrownOnLoadFailureWhenFailCtxIfServletStartFailsIsFalse()
447446
((StandardContext) context).setFailCtxIfServletStartFails(false);
448447
}
449448
});
450-
this.webServer = factory.getWebServer((context) -> {
451-
context.addServlet("failing", FailingServlet.class).setLoadOnStartup(0);
452-
});
449+
this.webServer = factory.getWebServer((context) -> context
450+
.addServlet("failing", FailingServlet.class).setLoadOnStartup(0));
453451
this.webServer.start();
454452
}
455453

0 commit comments

Comments
 (0)