Skip to content

Commit

Permalink
fixing CrossClustersCancellationIT
Browse files Browse the repository at this point in the history
  • Loading branch information
masseyke committed Jan 3, 2024
1 parent ece05a9 commit 7c9b19d
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,14 @@ private void createRemoteIndex(int numDocs) throws Exception {
mapping.endObject();
client(REMOTE_CLUSTER).admin().indices().prepareCreate("test").setMapping(mapping).get();
BulkRequestBuilder bulk = client(REMOTE_CLUSTER).prepareBulk("test").setRefreshPolicy(WriteRequest.RefreshPolicy.IMMEDIATE);
for (int i = 0; i < numDocs; i++) {
bulk.add(new IndexRequest().source("foo", i));
try {
for (int i = 0; i < numDocs; i++) {
bulk.add(new IndexRequest().source("foo", i));
}
bulk.get();
} finally {
bulk.request().decRef();
}
bulk.get();
}

public void testCancel() throws Exception {
Expand Down

0 comments on commit 7c9b19d

Please sign in to comment.