Add nullability annotations to tests in module/spring-boot-couchbase

See gh-47263
This commit is contained in:
Moritz Halbritter
2025-10-02 15:35:04 +02:00
parent 419d78b359
commit f5d6bea934
2 changed files with 12 additions and 0 deletions
+10
View File
@@ -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"
}
@@ -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");