mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 20:19:06 +00:00
Add nullability annotations to tests in module/spring-boot-couchbase
See gh-47263
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
+2
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user