public void testPutWarmerNoAcknowledgement() throws InterruptedException {
createIndex("test");
// make sure one shard is started so the search during put warmer will not fail
index("test", "type", "1", "f", 1);
PutWarmerResponse putWarmerResponse = client().admin().indices().preparePutWarmer("custom_warmer").setTimeout("0s")
.setSearchRequest(client().prepareSearch("test").setTypes("test").setQuery(QueryBuilders.matchAllQuery()))
.get();
assertThat(putWarmerResponse.isAcknowledged(), equalTo(false));
/* Since we don't wait for the ack here we have to wait until the search request has been executed from the master
* otherwise the test infra might have already deleted the index and the search request fails on all shards causing
* the test to fail too. We simply wait until the the warmer has been installed and also clean it up afterwards.*/
assertTrue(awaitBusy(new Predicate<Object>() {
@Override