mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-02 00:49:11 +00:00
Now that automatic refresh interval has been increased to 5m we need to invoke api refreshes from tests.
Original commit: elastic/x-pack-elasticsearch@5106e6e21b
This commit is contained in:
parent
500b86577e
commit
d522156e40
@ -338,6 +338,7 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg
|
||||
assertThat(routingTable.allPrimaryShardsActive(), is(true));
|
||||
}
|
||||
|
||||
refresh();
|
||||
SearchResponse searchResponse = client().prepareSearch(HistoryStore.INDEX_PREFIX + "*")
|
||||
.setIndicesOptions(IndicesOptions.lenientExpandOpen())
|
||||
.setQuery(boolQuery().must(matchQuery("watch_name", watchName)).must(matchQuery("state", WatchRecord.State.EXECUTED.id())))
|
||||
@ -351,6 +352,7 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg
|
||||
}
|
||||
|
||||
protected long findNumberOfPerformedActions(String watchName) {
|
||||
refresh();
|
||||
SearchResponse searchResponse = client().prepareSearch(HistoryStore.INDEX_PREFIX + "*")
|
||||
.setIndicesOptions(IndicesOptions.lenientExpandOpen())
|
||||
.setQuery(boolQuery().must(matchQuery("watch_name", watchName)).must(matchQuery("state", WatchRecord.State.EXECUTED.id())))
|
||||
@ -372,6 +374,7 @@ public abstract class AbstractWatcherIntegrationTests extends ElasticsearchInteg
|
||||
assertThat(routingTable.allPrimaryShardsActive(), is(true));
|
||||
}
|
||||
|
||||
refresh();
|
||||
SearchResponse searchResponse = client().prepareSearch(HistoryStore.INDEX_PREFIX + "*")
|
||||
.setIndicesOptions(IndicesOptions.lenientExpandOpen())
|
||||
.setQuery(boolQuery().must(matchQuery("watch_name", watchName)).must(matchQuery("state", WatchRecord.State.EXECUTION_NOT_NEEDED.id())))
|
||||
|
Loading…
x
Reference in New Issue
Block a user