Skip to content

Commit bd7c802

Browse files
committed
[fixup] Use 'Test Exception' in error message
1 parent 202f846 commit bd7c802

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/cassandra/CassandraHealthIndicatorTests.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,12 @@ void healthWithCassandraUp() {
6464
@Test
6565
void healthWithCassandraDown() {
6666
CqlSession session = mock(CqlSession.class);
67-
given(session.execute(any(SimpleStatement.class)))
68-
.willThrow(new DriverTimeoutException("Connection timed out (not really)"));
67+
given(session.execute(any(SimpleStatement.class))).willThrow(new DriverTimeoutException("Test Exception"));
6968
CassandraHealthIndicator healthIndicator = new CassandraHealthIndicator(session);
7069
Health health = healthIndicator.health();
7170
assertThat(health.getStatus()).isEqualTo(Status.DOWN);
7271
assertThat(health.getDetails().get("error"))
73-
.isEqualTo(DriverTimeoutException.class.getName() + ": Connection timed out (not really)");
72+
.isEqualTo(DriverTimeoutException.class.getName() + ": Test Exception");
7473
}
7574

7675
}

0 commit comments

Comments
 (0)