mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 00:49:11 +00:00
Fix tests differently
Original commit: elastic/x-pack-elasticsearch@00ec42c29b
This commit is contained in:
parent
cc9fac0f93
commit
a4f0077a2a
@ -23,6 +23,7 @@ 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;
|
||||
@ -181,7 +182,7 @@ public abstract class AbstractAlertingTests extends ElasticsearchIntegrationTest
|
||||
.get();
|
||||
assertThat(searchResponse.getHits().getTotalHits(), greaterThanOrEqualTo(minimumExpectedAlertActionsWithActionPerformed));
|
||||
if (assertTriggerSearchMatched) {
|
||||
assertThat(searchResponse.getHits().totalHits(), greaterThanOrEqualTo(1L));
|
||||
assertThat((Integer) XContentMapValues.extractValue("trigger_response.hits.total", searchResponse.getHits().getAt(0).sourceAsMap()), greaterThanOrEqualTo(1));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user