Add nullability annotations to tests in module/spring-boot-cassandra
See gh-47263
This commit is contained in:
parent
f8ce17c751
commit
b6950f8fb0
|
@ -48,3 +48,11 @@ dependencies {
|
|||
|
||||
testRuntimeOnly("ch.qos.logback:logback-classic")
|
||||
}
|
||||
|
||||
tasks.named("compileTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
||||
tasks.named("compileDockerTestJava") {
|
||||
options.nullability.checking = "tests"
|
||||
}
|
||||
|
|
|
@ -48,8 +48,10 @@ import static org.mockito.Mockito.mock;
|
|||
class CassandraDriverHealthIndicatorTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("NullAway") // Test null check
|
||||
void createWhenCqlSessionIsNullShouldThrowException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new CassandraDriverHealthIndicator(null));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new CassandraDriverHealthIndicator(null))
|
||||
.withMessage("'session' must not be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -51,8 +51,10 @@ import static org.mockito.Mockito.mock;
|
|||
class CassandraDriverReactiveHealthIndicatorTests {
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("NullAway") // Test null check
|
||||
void createWhenCqlSessionIsNullShouldThrowException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new CassandraDriverReactiveHealthIndicator(null));
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> new CassandraDriverReactiveHealthIndicator(null))
|
||||
.withMessage("'session' must not be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue