mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
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: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+5.4+multijob-intake/94/console
This commit is contained in:
parent
b6cb9a4e8a
commit
e49ebd04fd
@ -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"))
|
||||
|
Loading…
x
Reference in New Issue
Block a user