TEST: Fix AbstractAlertingTests

Original commit: elastic/x-pack-elasticsearch@1611f84a41
This commit is contained in:
Brian Murphy 2014-12-04 15:40:18 +00:00
parent 3f4d469d4a
commit cc9fac0f93
1 changed files with 1 additions and 2 deletions

View File

@ -23,7 +23,6 @@ import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.xcontent.ToXContent;
import org.elasticsearch.common.xcontent.XContentBuilder;
import org.elasticsearch.common.xcontent.support.XContentMapValues;
import org.elasticsearch.test.ElasticsearchIntegrationTest;
import org.elasticsearch.test.InternalTestCluster;
import org.elasticsearch.test.TestCluster;
@ -182,7 +181,7 @@ public abstract class AbstractAlertingTests extends ElasticsearchIntegrationTest
.get();
assertThat(searchResponse.getHits().getTotalHits(), greaterThanOrEqualTo(minimumExpectedAlertActionsWithActionPerformed));
if (assertTriggerSearchMatched) {
assertThat((Integer) XContentMapValues.extractValue("response.hits.total", searchResponse.getHits().getAt(0).sourceAsMap()), greaterThanOrEqualTo(1));
assertThat(searchResponse.getHits().totalHits(), greaterThanOrEqualTo(1L));
}
}
});