mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-tomcat
See gh-47263
This commit is contained in:
@@ -26,3 +26,7 @@ dependencies {
|
||||
testImplementation(project(":module:spring-boot-resttestclient"))
|
||||
testImplementation(project(":starter:spring-boot-starter-test"))
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+1
@@ -98,6 +98,7 @@ class SampleTomcatApplicationTests {
|
||||
void testTimeout() {
|
||||
ServletWebServerApplicationContext context = (ServletWebServerApplicationContext) this.applicationContext;
|
||||
TomcatWebServer embeddedServletContainer = (TomcatWebServer) context.getWebServer();
|
||||
assertThat(embeddedServletContainer).isNotNull();
|
||||
ProtocolHandler protocolHandler = embeddedServletContainer.getTomcat().getConnector().getProtocolHandler();
|
||||
int timeout = ((AbstractProtocol<?>) protocolHandler).getConnectionTimeout();
|
||||
assertThat(timeout).isEqualTo(5000);
|
||||
|
||||
Reference in New Issue
Block a user