mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-27 15:39:49 +00:00
Add retry test case for delete-by-query
Tests that we retry failed searches, scrolls, and bulks.
This commit is contained in:
parent
a93f578bf6
commit
5e81270509
@ -19,7 +19,6 @@
|
|||||||
|
|
||||||
package org.elasticsearch.index.reindex;
|
package org.elasticsearch.index.reindex;
|
||||||
|
|
||||||
import org.apache.lucene.util.LuceneTestCase.AwaitsFix;
|
|
||||||
import org.elasticsearch.action.ListenableActionFuture;
|
import org.elasticsearch.action.ListenableActionFuture;
|
||||||
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse;
|
||||||
import org.elasticsearch.action.bulk.BackoffPolicy;
|
import org.elasticsearch.action.bulk.BackoffPolicy;
|
||||||
@ -103,8 +102,13 @@ public class RetryTests extends ESSingleNodeTestCase {
|
|||||||
matcher().updated(DOC_COUNT));
|
matcher().updated(DOC_COUNT));
|
||||||
}
|
}
|
||||||
|
|
||||||
private void testCase(String action, AbstractBulkIndexByScrollRequestBuilder<?, ?> request, BulkIndexByScrollResponseMatcher matcher)
|
public void testDeleteByQuery() throws Exception {
|
||||||
throws Exception {
|
testCase(DeleteByQueryAction.NAME, DeleteByQueryAction.INSTANCE.newRequestBuilder(client()).source("source"),
|
||||||
|
matcher().deleted(DOC_COUNT));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void testCase(String action, AbstractBulkByScrollRequestBuilder<?, BulkIndexByScrollResponse, ?> request,
|
||||||
|
BulkIndexByScrollResponseMatcher matcher) throws Exception {
|
||||||
logger.info("Blocking search");
|
logger.info("Blocking search");
|
||||||
CyclicBarrier initialSearchBlock = blockExecutor(ThreadPool.Names.SEARCH);
|
CyclicBarrier initialSearchBlock = blockExecutor(ThreadPool.Names.SEARCH);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user