Skip to content

Commit 09c53cc

Browse files
committed
log the existing indices instead of entire Metadata and
reduce the number of indices to be auto followed Relates to elastic#36761
1 parent d0c7c63 commit 09c53cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/AutoFollowIT.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public void testAutoFollowManyIndices() throws Exception {
145145
assertThat(autoFollowStats[0].getNumberOfSuccessfulFollowIndices(), equalTo(expectedVal1));
146146
});
147147
} catch (AssertionError ae) {
148-
logger.warn("metadata={}", Strings.toString(metaData[0]));
148+
logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class)));
149149
logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0]));
150150
throw ae;
151151
}
@@ -160,15 +160,15 @@ public void testAutoFollowManyIndices() throws Exception {
160160
assertThat(autoFollowStats[0].getAutoFollowedClusters().size(), equalTo(0));
161161
});
162162
} catch (AssertionError ae) {
163-
logger.warn("metadata={}", Strings.toString(metaData[0]));
163+
logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class)));
164164
logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0]));
165165
throw ae;
166166
}
167167
createLeaderIndex("logs-does-not-count", leaderIndexSettings);
168168

169169
putAutoFollowPatterns("my-pattern", new String[] {"logs-*"});
170170
long i = numIndices;
171-
numIndices = numIndices + randomIntBetween(4, 16);
171+
numIndices = numIndices + randomIntBetween(4, 8);
172172
for (; i < numIndices; i++) {
173173
createLeaderIndex("logs-" + i, leaderIndexSettings);
174174
}
@@ -185,7 +185,7 @@ public void testAutoFollowManyIndices() throws Exception {
185185
assertThat(autoFollowStats[0].getRecentAutoFollowErrors().size(), equalTo(0));
186186
});
187187
} catch (AssertionError ae) {
188-
logger.warn("metadata={}", Strings.toString(metaData[0]));
188+
logger.warn("indices={}", Arrays.toString(metaData[0].indices().keys().toArray(String.class)));
189189
logger.warn("auto follow stats={}", Strings.toString(autoFollowStats[0]));
190190
throw ae;
191191
}

0 commit comments

Comments
 (0)