浏览代码

Increase timeout testFollowIndexMaxOperationSizeInBytes (#53014)

Replicating 1000 documents one by one (as we cap the request size at 
1 byte) can take more than 10 seconds on a slow CI.

Closes #52812
Nhat Nguyen 5 年之前
父节点
当前提交
5a6ab5d04e
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java

+ 2 - 2
x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java

@@ -605,7 +605,7 @@ public class IndexFollowingIT extends CcrIntegTestCase {
         }
         }
 
 
         PutFollowAction.Request followRequest = putFollow("index1", "index2");
         PutFollowAction.Request followRequest = putFollow("index1", "index2");
-        followRequest.getParameters().setMaxReadRequestSize(new ByteSizeValue(1, ByteSizeUnit.BYTES));
+        followRequest.getParameters().setMaxReadRequestSize(new ByteSizeValue(randomIntBetween(1, 1024), ByteSizeUnit.BYTES));
         followerClient().execute(PutFollowAction.INSTANCE, followRequest).get();
         followerClient().execute(PutFollowAction.INSTANCE, followRequest).get();
 
 
         final Map<ShardId, Long> firstBatchNumDocsPerShard = new HashMap<>();
         final Map<ShardId, Long> firstBatchNumDocsPerShard = new HashMap<>();
@@ -618,7 +618,7 @@ public class IndexFollowingIT extends CcrIntegTestCase {
             }
             }
         }
         }
 
 
-        assertBusy(assertTask(1, firstBatchNumDocsPerShard));
+        assertBusy(assertTask(1, firstBatchNumDocsPerShard), 60, TimeUnit.SECONDS);
         for (int i = 0; i < numDocs; i++) {
         for (int i = 0; i < numDocs; i++) {
             assertBusy(assertExpectedDocumentRunnable(i));
             assertBusy(assertExpectedDocumentRunnable(i));
         }
         }