@Test // issue #6 public void testThatEmptyMetricsDoNotResultInBrokenBulkRequest() throws Exception { long connectionsBeforeReporting = getTotalHttpConnections(); elasticsearchReporter.report(); long connectionsAfterReporting = getTotalHttpConnections(); org.assertj.core.api.Assertions.assertThat(connectionsAfterReporting) .isEqualTo(connectionsBeforeReporting); }
private void reportAndRefresh() { elasticsearchReporter.report(); client().admin().indices().prepareRefresh(indexWithDate).execute().actionGet(); }