diff --git a/module/spring-boot-couchbase/build.gradle b/module/spring-boot-couchbase/build.gradle index ddc1b07bf55..ac4e2309c45 100644 --- a/module/spring-boot-couchbase/build.gradle +++ b/module/spring-boot-couchbase/build.gradle @@ -44,5 +44,15 @@ dependencies { testImplementation(project(":core:spring-boot-test")) testImplementation(project(":test-support:spring-boot-test-support")) + testCompileOnly("com.google.code.findbugs:jsr305") + testRuntimeOnly("ch.qos.logback:logback-classic") } + +tasks.named("compileTestJava") { + options.nullability.checking = "tests" +} + +tasks.named("compileDockerTestJava") { + options.nullability.checking = "tests" +} diff --git a/module/spring-boot-couchbase/src/test/java/org/springframework/boot/couchbase/health/CouchbaseReactiveHealthIndicatorTests.java b/module/spring-boot-couchbase/src/test/java/org/springframework/boot/couchbase/health/CouchbaseReactiveHealthIndicatorTests.java index 2e6732c14a8..ebac32f3dc3 100644 --- a/module/spring-boot-couchbase/src/test/java/org/springframework/boot/couchbase/health/CouchbaseReactiveHealthIndicatorTests.java +++ b/module/spring-boot-couchbase/src/test/java/org/springframework/boot/couchbase/health/CouchbaseReactiveHealthIndicatorTests.java @@ -60,6 +60,7 @@ class CouchbaseReactiveHealthIndicatorTests { given(reactiveCluster.diagnostics()).willReturn(Mono.just(diagnostics)); given(cluster.reactive()).willReturn(reactiveCluster); Health health = healthIndicator.health().block(Duration.ofSeconds(30)); + assertThat(health).isNotNull(); assertThat(health.getStatus()).isEqualTo(Status.UP); assertThat(health.getDetails()).containsEntry("sdk", "test-sdk"); assertThat(health.getDetails()).containsKey("endpoints"); @@ -85,6 +86,7 @@ class CouchbaseReactiveHealthIndicatorTests { given(reactiveCluster.diagnostics()).willReturn(Mono.just(diagnostics)); given(cluster.reactive()).willReturn(reactiveCluster); Health health = healthIndicator.health().block(Duration.ofSeconds(30)); + assertThat(health).isNotNull(); assertThat(health.getStatus()).isEqualTo(Status.DOWN); assertThat(health.getDetails()).containsEntry("sdk", "test-sdk"); assertThat(health.getDetails()).containsKey("endpoints");