|
|
|
@ -86,10 +86,8 @@ public class JmsHealthIndicatorTests {
|
|
|
|
|
given(connectionMetaData.getJMSProviderName()).willReturn("JMS test provider");
|
|
|
|
|
Connection connection = mock(Connection.class);
|
|
|
|
|
given(connection.getMetaData()).willReturn(connectionMetaData);
|
|
|
|
|
willThrow(new JMSException("Could not start", "123"))
|
|
|
|
|
.given(connection).start();
|
|
|
|
|
given(connectionFactory.createConnection())
|
|
|
|
|
.willReturn(connection);
|
|
|
|
|
willThrow(new JMSException("Could not start", "123")).given(connection).start();
|
|
|
|
|
given(connectionFactory.createConnection()).willReturn(connection);
|
|
|
|
|
JmsHealthIndicator indicator = new JmsHealthIndicator(connectionFactory);
|
|
|
|
|
Health health = indicator.health();
|
|
|
|
|
assertEquals(Status.DOWN, health.getStatus());
|
|
|
|
|