Polish "Add health indicator for Cassandra that uses the CqlSession"
See gh-20887
This commit is contained in:
@@ -30,9 +30,6 @@ import org.springframework.util.Assert;
|
||||
* Simple implementation of a {@link HealthIndicator} returning status information for
|
||||
* Cassandra data stores.
|
||||
*
|
||||
* This health indicator is automatically used when Spring Data Cassandra is not present,
|
||||
* but the Cassandra driver is.
|
||||
*
|
||||
* @author Alexandre Dutra
|
||||
* @since 2.4.0
|
||||
*/
|
||||
|
||||
@@ -29,9 +29,6 @@ import org.springframework.util.Assert;
|
||||
* Simple implementation of a {@link ReactiveHealthIndicator} returning status information
|
||||
* for Cassandra data stores.
|
||||
*
|
||||
* This health indicator is automatically used when Spring Data Cassandra is not present,
|
||||
* but the Cassandra driver is.
|
||||
*
|
||||
* @author Alexandre Dutra
|
||||
* @since 2.4.0
|
||||
*/
|
||||
|
||||
@@ -58,7 +58,6 @@ class CassandraDriverReactiveHealthIndicatorTests {
|
||||
given(session.executeReactive(any(SimpleStatement.class))).willReturn(results);
|
||||
doAnswer(mockReactiveResultSetBehavior(row)).when(results).subscribe(any());
|
||||
given(row.getString(0)).willReturn("6.0.0");
|
||||
|
||||
CassandraDriverReactiveHealthIndicator cassandraReactiveHealthIndicator = new CassandraDriverReactiveHealthIndicator(
|
||||
session);
|
||||
Mono<Health> health = cassandraReactiveHealthIndicator.health();
|
||||
@@ -74,7 +73,6 @@ class CassandraDriverReactiveHealthIndicatorTests {
|
||||
CqlSession session = mock(CqlSession.class);
|
||||
given(session.executeReactive(any(SimpleStatement.class)))
|
||||
.willThrow(new DriverTimeoutException("Test Exception"));
|
||||
|
||||
CassandraDriverReactiveHealthIndicator cassandraReactiveHealthIndicator = new CassandraDriverReactiveHealthIndicator(
|
||||
session);
|
||||
Mono<Health> health = cassandraReactiveHealthIndicator.health();
|
||||
|
||||
Reference in New Issue
Block a user