Polish "Use non-blocking API in CouchbaseReactiveHealthIndicator"

See gh-32505
pull/32747/head
Stephane Nicoll 2 years ago
parent f51c4c3df0
commit 8f598f876b

@ -16,7 +16,6 @@
package org.springframework.boot.actuate.couchbase;
import com.couchbase.client.core.diagnostics.DiagnosticsResult;
import com.couchbase.client.java.Cluster;
import reactor.core.publisher.Mono;
@ -46,7 +45,7 @@ public class CouchbaseReactiveHealthIndicator extends AbstractReactiveHealthIndi
@Override
protected Mono<Health> doHealthCheck(Health.Builder builder) {
return this.cluster.reactive().diagnostics().map(diagnostics -> {
return this.cluster.reactive().diagnostics().map((diagnostics) -> {
new CouchbaseHealth(diagnostics).applyTo(builder);
return builder.build();
});

@ -30,10 +30,10 @@ import com.couchbase.client.core.service.ServiceType;
import com.couchbase.client.java.Cluster;
import com.couchbase.client.java.ReactiveCluster;
import org.junit.jupiter.api.Test;
import reactor.core.publisher.Mono;
import org.springframework.boot.actuate.health.Health;
import org.springframework.boot.actuate.health.Status;
import reactor.core.publisher.Mono;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.BDDMockito.given;

Loading…
Cancel
Save