mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-28 21:19:02 +00:00
Add nullability annotations to tests in smoke-test/spring-boot-smoke-test-liquibase
See gh-47263
This commit is contained in:
@@ -29,3 +29,7 @@ dependencies {
|
||||
|
||||
testImplementation(project(":starter:spring-boot-starter-test"))
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
+4
-1
@@ -69,7 +69,10 @@ class SampleLiquibaseApplicationTests {
|
||||
};
|
||||
if (nested.contains(ConnectException.class)) {
|
||||
Throwable root = nested.getRootCause();
|
||||
return root.getMessage().contains("Connection refused");
|
||||
assertThat(root).isNotNull();
|
||||
String message = root.getMessage();
|
||||
assertThat(message).isNotNull();
|
||||
return message.contains("Connection refused");
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user