Skip to content

Commit

Permalink
log the existing indices instead of entire Metadata and
Browse files Browse the repository at this point in the history
reduce the number of indices to be auto followed

Relates to elastic#36761
  • Loading branch information
martijnvg committed Mar 8, 2019
1 parent d0c7c63 commit 09c53cc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -160,15 +160,15 @@ 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;
}
createLeaderIndex("logs-does-not-count", leaderIndexSettings);

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);
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 09c53cc

Please sign in to comment.