|
|
|
@ -46,7 +46,7 @@ public class ElasticsearchJestHealthIndicatorTests { |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void elasticSearchIsUp() throws IOException { |
|
|
|
public void elasticsearchIsUp() throws IOException { |
|
|
|
given(this.jestClient.execute(any(Action.class))) |
|
|
|
given(this.jestClient.execute(any(Action.class))) |
|
|
|
.willReturn(createJestResult(4, 0)); |
|
|
|
.willReturn(createJestResult(4, 0)); |
|
|
|
|
|
|
|
|
|
|
|
@ -56,7 +56,7 @@ public class ElasticsearchJestHealthIndicatorTests { |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void elasticSearchIsDown() throws IOException { |
|
|
|
public void elasticsearchIsDown() throws IOException { |
|
|
|
given(this.jestClient.execute(any(Action.class))).willThrow( |
|
|
|
given(this.jestClient.execute(any(Action.class))).willThrow( |
|
|
|
new CouldNotConnectException("http://localhost:9200", new IOException())); |
|
|
|
new CouldNotConnectException("http://localhost:9200", new IOException())); |
|
|
|
Health health = this.healthIndicator.health(); |
|
|
|
Health health = this.healthIndicator.health(); |
|
|
|
@ -65,7 +65,7 @@ public class ElasticsearchJestHealthIndicatorTests { |
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@SuppressWarnings("unchecked") |
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void elasticSearchIsOutOfService() throws IOException { |
|
|
|
public void elasticsearchIsOutOfService() throws IOException { |
|
|
|
given(this.jestClient.execute(any(Action.class))) |
|
|
|
given(this.jestClient.execute(any(Action.class))) |
|
|
|
.willReturn(createJestResult(4, 1)); |
|
|
|
.willReturn(createJestResult(4, 1)); |
|
|
|
Health health = this.healthIndicator.health(); |
|
|
|
Health health = this.healthIndicator.health(); |
|
|
|
|