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-multi-connectors
See gh-47263
This commit is contained in:
@@ -27,3 +27,7 @@ dependencies {
|
||||
testImplementation(project(":starter:spring-boot-starter-webmvc-test"))
|
||||
testImplementation("org.apache.httpcomponents.client5:httpclient5")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+4
-1
@@ -30,6 +30,7 @@ import org.springframework.boot.test.context.TestConfiguration;
|
||||
import org.springframework.boot.test.web.server.LocalServerPort;
|
||||
import org.springframework.boot.tomcat.TomcatWebServer;
|
||||
import org.springframework.boot.web.server.AbstractConfigurableWebServerFactory;
|
||||
import org.springframework.boot.web.server.Ssl;
|
||||
import org.springframework.boot.web.server.context.WebServerInitializedEvent;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.context.annotation.Import;
|
||||
@@ -63,7 +64,9 @@ class SampleTomcatTwoConnectorsApplicationTests {
|
||||
|
||||
@Test
|
||||
void testSsl() {
|
||||
assertThat(this.webServerFactory.getSsl().isEnabled()).isTrue();
|
||||
Ssl ssl = this.webServerFactory.getSsl();
|
||||
assertThat(ssl).isNotNull();
|
||||
assertThat(ssl.isEnabled()).isTrue();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user