Get more information when reindex test fails
It looks like it leaks contexts but it isn't clear why so this
adds a little more logging. This is the failure:
@@ -22,6 +22,7 @@ package org.elasticsearch.index.reindex;
import org.elasticsearch.action.bulk.BulkItemResponse.Failure;
import org.elasticsearch.action.bulk.byscroll.BulkByScrollResponse;
import org.elasticsearch.action.index.IndexRequestBuilder;
+import org.elasticsearch.test.junit.annotations.TestLogging;
import java.util.ArrayList;
import java.util.List;
@@ -38,6 +39,7 @@ import static org.hamcrest.Matchers.lessThanOrEqualTo;
/**
* Tests failure capturing and abort-on-failure behavior of reindex.
*/
+@TestLogging("_root:DEBUG")
public class ReindexFailureTests extends ReindexTestCase {
public void testFailuresCauseAbortDefault() throws Exception {
/*
@@ -107,7 +109,7 @@ public class ReindexFailureTests extends ReindexTestCase {
logger.info("Didn't trigger a reindex failure on the {} attempt", attempt);
attempt++;
} catch (ExecutionException e) {
- logger.info("Triggered a reindex failure on the {} attempt", attempt);
+ logger.info("Triggered a reindex failure on the {} attempt: {}", attempt, e.getMessage());
assertThat(e.getMessage(),
either(containsString("all shards failed"))
.or(containsString("No search context found"))
