@@ -144,7 +144,6 @@ public void testGetOperationsBasedOnGlobalSequenceId() throws Exception {
144
144
assertThat (operation .id (), equalTo ("5" ));
145
145
}
146
146
147
- // @TestLogging("org.elasticsearch.xpack.ccr.action:DEBUG")
148
147
public void testFollowIndex () throws Exception {
149
148
final int numberOfPrimaryShards = randomIntBetween (1 , 3 );
150
149
final String leaderIndexSettings = getIndexSettings (numberOfPrimaryShards ,
@@ -161,6 +160,7 @@ public void testFollowIndex() throws Exception {
161
160
client ().execute (CreateAndFollowIndexAction .INSTANCE , createAndFollowRequest ).get ();
162
161
163
162
final int firstBatchNumDocs = randomIntBetween (2 , 64 );
163
+ logger .info ("Indexing [{}] docs as first batch" , firstBatchNumDocs );
164
164
for (int i = 0 ; i < firstBatchNumDocs ; i ++) {
165
165
final String source = String .format (Locale .ROOT , "{\" f\" :%d}" , i );
166
166
client ().prepareIndex ("index1" , "doc" , Integer .toString (i )).setSource (source , XContentType .JSON ).get ();
@@ -184,6 +184,7 @@ public void testFollowIndex() throws Exception {
184
184
unfollowIndex ("index2" );
185
185
client ().execute (FollowIndexAction .INSTANCE , followRequest ).get ();
186
186
final int secondBatchNumDocs = randomIntBetween (2 , 64 );
187
+ logger .info ("Indexing [{}] docs as second batch" , secondBatchNumDocs );
187
188
for (int i = firstBatchNumDocs ; i < firstBatchNumDocs + secondBatchNumDocs ; i ++) {
188
189
final String source = String .format (Locale .ROOT , "{\" f\" :%d}" , i );
189
190
client ().prepareIndex ("index1" , "doc" , Integer .toString (i )).setSource (source , XContentType .JSON ).get ();
@@ -211,11 +212,11 @@ public void testSyncMappings() throws Exception {
211
212
Collections .singletonMap (IndexSettings .INDEX_SOFT_DELETES_SETTING .getKey (), "true" ));
212
213
assertAcked (client ().admin ().indices ().prepareCreate ("index1" ).setSource (leaderIndexSettings , XContentType .JSON ));
213
214
ensureGreen ("index1" );
214
-
215
+
215
216
final FollowIndexAction .Request followRequest = new FollowIndexAction .Request ();
216
217
followRequest .setLeaderIndex ("index1" );
217
218
followRequest .setFollowIndex ("index2" );
218
-
219
+
219
220
final CreateAndFollowIndexAction .Request createAndFollowRequest = new CreateAndFollowIndexAction .Request ();
220
221
createAndFollowRequest .setFollowRequest (followRequest );
221
222
client ().execute (CreateAndFollowIndexAction .INSTANCE , createAndFollowRequest ).get ();
@@ -407,7 +408,7 @@ private void unfollowIndex(String index) throws Exception {
407
408
private CheckedRunnable <Exception > assertExpectedDocumentRunnable (final int value ) {
408
409
return () -> {
409
410
final GetResponse getResponse = client ().prepareGet ("index2" , "doc" , Integer .toString (value )).get ();
410
- assertTrue ("doc with id [" + value + "] does not exist " , getResponse .isExists ());
411
+ assertTrue ("Doc with id [" + value + "] is missing " , getResponse .isExists ());
411
412
assertTrue ((getResponse .getSource ().containsKey ("f" )));
412
413
assertThat (getResponse .getSource ().get ("f" ), equalTo (value ));
413
414
};
0 commit comments