From 09c53ccef54cf26fe9db8846fb3c9abc6930b684 Mon Sep 17 00:00:00 2001 From: Martijn van Groningen Date: Fri, 8 Mar 2019 11:04:32 +0100 Subject: [PATCH] log the existing indices instead of entire Metadata and reduce the number of indices to be auto followed Relates to #36761 --- .../java/org/elasticsearch/xpack/ccr/AutoFollowIT.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java index fc63e03620db2..485352d8492ca 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java @@ -145,7 +145,7 @@ public void testAutoFollowManyIndices() throws Exception { assertThat(autoFollowStats[0].getNumberOfSuccessfulFollowIndices(), equalTo(expectedVal1)); }); } catch (AssertionError ae) { - logger.warn("metadata={}", Strings.toString(metaData[0])); + logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class))); logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0])); throw ae; } @@ -160,7 +160,7 @@ public void testAutoFollowManyIndices() throws Exception { assertThat(autoFollowStats[0].getAutoFollowedClusters().size(), equalTo(0)); }); } catch (AssertionError ae) { - logger.warn("metadata={}", Strings.toString(metaData[0])); + logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class))); logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0])); throw ae; } @@ -168,7 +168,7 @@ public void testAutoFollowManyIndices() throws Exception { putAutoFollowPatterns("my-pattern", new String[] {"logs-*"}); long i = numIndices; - numIndices = numIndices + randomIntBetween(4, 16); + numIndices = numIndices + randomIntBetween(4, 8); for (; i < numIndices; i++) { createLeaderIndex("logs-" + i, leaderIndexSettings); } @@ -185,7 +185,7 @@ public void testAutoFollowManyIndices() throws Exception { assertThat(autoFollowStats[0].getRecentAutoFollowErrors().size(), equalTo(0)); }); } catch (AssertionError ae) { - logger.warn("metadata={}", Strings.toString(metaData[0])); + logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class))); logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0])); throw ae; }