TEST: Fix AbstractAlertingTests
Original commit: elastic/x-pack-elasticsearch@1611f84a41
This commit is contained in:
parent
3f4d469d4a
commit
cc9fac0f93
|
@ -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));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue