@Test public void runOneIteration() throws Exception { TSDRMetricRecord record = TsdrRecordFactory.createMetricRecord(); Mockito.doReturn(null).when(CLIENT).execute(Mockito.any(Bulk.class)); store.store(record); store.runOneIteration(); Mockito.verify(CLIENT, Mockito.atLeastOnce()).execute(Mockito.any(Bulk.class)); Mockito.doThrow(IOException.class).when(CLIENT).execute(Mockito.any(Bulk.class)); store.store(record); store.runOneIteration(); Mockito.verify(CLIENT, Mockito.atLeastOnce()).execute(Mockito.any(Bulk.class)); }
@Override protected void runOneIteration() throws Exception { sync(); }
ElasticSearchStore extends AbstractScheduledService implements AutoCloseable { @Override protected void runOneIteration() throws Exception { sync(); } }
ElasticSearchStore extends AbstractScheduledService implements AutoCloseable { @Override protected void runOneIteration() throws Exception { sync(); } @Inject  ElasticSearchStore(); @VisibleForTesting  ElasticSearchStore(Map<String, String> properties, JestClient client); }
ElasticSearchStore extends AbstractScheduledService implements AutoCloseable { @Override protected void runOneIteration() throws Exception { sync(); } @Inject  ElasticSearchStore(); @VisibleForTesting  ElasticSearchStore(Map<String, String> properties, JestClient client); @PostConstruct void init(); @Override @PreDestroy void close(); }
ElasticSearchStore extends AbstractScheduledService implements AutoCloseable { @Override protected void runOneIteration() throws Exception { sync(); } @Inject  ElasticSearchStore(); @VisibleForTesting  ElasticSearchStore(Map<String, String> properties, JestClient client); @PostConstruct void init(); @Override @PreDestroy void close();  }