Skip to content

Commit

Permalink
try IT workaround
Browse files Browse the repository at this point in the history
  • Loading branch information
Christoph Büscher committed Mar 20, 2020
1 parent 28b307a commit 9266287
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package org.elasticsearch.client.asyncsearch;

import org.elasticsearch.action.admin.indices.delete.DeleteIndexRequest;
import org.elasticsearch.client.ESRestHighLevelClientTestCase;
import org.elasticsearch.client.RequestOptions;
import org.elasticsearch.client.core.AcknowledgedResponse;
Expand Down Expand Up @@ -68,5 +69,12 @@ public void testAsyncSearch() throws IOException {
RequestOptions.DEFAULT);
assertNotNull(deleteAsyncSearchResponse);
assertNotNull(deleteAsyncSearchResponse.isAcknowledged());

// TODO remove this workaround
// we manually delete the ".async_search" index after this test because otherwise
// test cluster stays in cluster_health yellow bc. that index requires 1 replica
org.elasticsearch.action.support.master.AcknowledgedResponse deleteResponse = highLevelClient().indices()
.delete(new DeleteIndexRequest(".async-search"), RequestOptions.DEFAULT);
assertTrue(deleteResponse.isAcknowledged());
}
}

0 comments on commit 9266287

Please sign in to comment.