mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-15 01:07:30 +08:00
Adapt to breaking changes in Couchbase Driver 3.3
See gh-31031
This commit is contained in:
parent
a7a4e97b3c
commit
3892b56a32
@ -51,8 +51,9 @@ class CouchbaseHealthIndicatorTests {
|
||||
Cluster cluster = mock(Cluster.class);
|
||||
CouchbaseHealthIndicator healthIndicator = new CouchbaseHealthIndicator(cluster);
|
||||
Map<ServiceType, List<EndpointDiagnostics>> endpoints = Collections.singletonMap(ServiceType.KV,
|
||||
Collections.singletonList(new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1",
|
||||
"127.0.0.1", Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"))));
|
||||
Collections.singletonList(
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"), Optional.empty())));
|
||||
|
||||
DiagnosticsResult diagnostics = new DiagnosticsResult(endpoints, "test-sdk", "test-id");
|
||||
given(cluster.diagnostics()).willReturn(diagnostics);
|
||||
@ -72,9 +73,9 @@ class CouchbaseHealthIndicatorTests {
|
||||
Map<ServiceType, List<EndpointDiagnostics>> endpoints = Collections.singletonMap(ServiceType.KV,
|
||||
Arrays.asList(
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1")),
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"), Optional.empty()),
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTING, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-2"))));
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-2"), Optional.empty())));
|
||||
DiagnosticsResult diagnostics = new DiagnosticsResult(endpoints, "test-sdk", "test-id");
|
||||
given(cluster.diagnostics()).willReturn(diagnostics);
|
||||
Health health = healthIndicator.health();
|
||||
|
@ -49,8 +49,9 @@ class CouchbaseReactiveHealthIndicatorTests {
|
||||
Cluster cluster = mock(Cluster.class);
|
||||
CouchbaseReactiveHealthIndicator healthIndicator = new CouchbaseReactiveHealthIndicator(cluster);
|
||||
Map<ServiceType, List<EndpointDiagnostics>> endpoints = Collections.singletonMap(ServiceType.KV,
|
||||
Collections.singletonList(new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1",
|
||||
"127.0.0.1", Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"))));
|
||||
Collections.singletonList(
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"), Optional.empty())));
|
||||
DiagnosticsResult diagnostics = new DiagnosticsResult(endpoints, "test-sdk", "test-id");
|
||||
given(cluster.diagnostics()).willReturn(diagnostics);
|
||||
Health health = healthIndicator.health().block(Duration.ofSeconds(30));
|
||||
@ -69,9 +70,9 @@ class CouchbaseReactiveHealthIndicatorTests {
|
||||
Map<ServiceType, List<EndpointDiagnostics>> endpoints = Collections.singletonMap(ServiceType.KV,
|
||||
Arrays.asList(
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTED, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1")),
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-1"), Optional.empty()),
|
||||
new EndpointDiagnostics(ServiceType.KV, EndpointState.CONNECTING, "127.0.0.1", "127.0.0.1",
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-2"))));
|
||||
Optional.empty(), Optional.of(1234L), Optional.of("endpoint-2"), Optional.empty())));
|
||||
DiagnosticsResult diagnostics = new DiagnosticsResult(endpoints, "test-sdk", "test-id");
|
||||
given(cluster.diagnostics()).willReturn(diagnostics);
|
||||
Health health = healthIndicator.health().block(Duration.ofSeconds(30));
|
||||
|
Loading…
Reference in New Issue
Block a user