Test: change assertion to make sense

Original commit: elastic/x-pack-elasticsearch@8f01dcff03
This commit is contained in:
Martijn van Groningen 2015-02-26 19:26:07 +01:00
parent 4363acb09b
commit b76b0e7129
1 changed files with 2 additions and 4 deletions

View File

@ -37,6 +37,7 @@ import java.util.concurrent.TimeUnit;
import static org.elasticsearch.common.xcontent.XContentFactory.jsonBuilder;
import static org.elasticsearch.index.query.QueryBuilders.termQuery;
import static org.elasticsearch.search.builder.SearchSourceBuilder.searchSource;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.core.IsEqual.equalTo;
@ -107,9 +108,6 @@ public class BootStrapTest extends AbstractAlertingTests {
.get();
assertTrue(indexResponse.isCreated());
// The executor doesn't get shutdown when alerts stops, so the largest queue size don't get reset.
long previousLargestQueueSize = response.getAlertActionManagerLargestQueueSize();
stopAlerting();
startAlerting();
@ -117,7 +115,7 @@ public class BootStrapTest extends AbstractAlertingTests {
assertTrue(response.isAlertActionManagerStarted());
assertThat(response.getAlertManagerStarted(), equalTo(AlertsService.State.STARTED));
assertThat(response.getNumberOfRegisteredAlerts(), equalTo(1L));
assertThat(response.getAlertActionManagerLargestQueueSize() - previousLargestQueueSize, equalTo(1L));
assertThat(response.getAlertActionManagerLargestQueueSize(), greaterThanOrEqualTo(1l));
}
@Test