From 0a300320cd096f40d4ac570b7b23912592a923c5 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Fri, 13 May 2016 11:47:00 -0400 Subject: [PATCH] [test] Set logging to 11 on reindex test It has failures we can't explain and we need logs to be able to do anything useful with the failures: https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+g1gc/359/consoleFull --- .../org/elasticsearch/index/reindex/RethrottleTests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RethrottleTests.java b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RethrottleTests.java index ab4b76ef23f..5a0196159de 100644 --- a/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RethrottleTests.java +++ b/modules/reindex/src/test/java/org/elasticsearch/index/reindex/RethrottleTests.java @@ -21,6 +21,7 @@ package org.elasticsearch.index.reindex; import org.elasticsearch.action.ListenableActionFuture; import org.elasticsearch.action.admin.cluster.node.tasks.list.ListTasksResponse; +import org.elasticsearch.test.junit.annotations.TestLogging; import static org.hamcrest.Matchers.hasSize; @@ -29,6 +30,9 @@ import static org.hamcrest.Matchers.hasSize; * too but this is the only place that tests running against multiple nodes so it is the only integration tests that checks for * serialization. */ +// Extra logging in case of failure. We couldn't explain the last failure: +// https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+master+g1gc/359/consoleFull +@TestLogging("_root:DEBUG") public class RethrottleTests extends ReindexTestCase { public void testReindex() throws Exception { @@ -56,6 +60,8 @@ public class RethrottleTests extends ReindexTestCase { // Now rethrottle it so it'll finish ListTasksResponse rethrottleResponse = rethrottle().setActions(actionName).setRequestsPerSecond(Float.POSITIVE_INFINITY).get(); assertThat(rethrottleResponse.getTasks(), hasSize(1)); + BulkByScrollTask.Status status = (BulkByScrollTask.Status) rethrottleResponse.getTasks().get(0).getStatus(); + assertEquals(Float.POSITIVE_INFINITY, status.getRequestsPerSecond(), Float.MIN_NORMAL); // Now the response should come back quickly because we've rethrottled the request BulkIndexByScrollResponse response = responseListener.get();