Skip to content

Commit d031e13

Browse files
DaveCTurneromricohenn
authored andcommitted
Exercise multi-part uploads in S3 repo analysis tests (elastic#125669)
Extends the max blob size to 10MiB, and sets the buffer size to 5MiB, to ensure that sometimes the S3 repo analysis tests will create blobs using the multipart upload flow.
1 parent f2834a1 commit d031e13

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

x-pack/plugin/snapshot-repo-test-kit/qa/s3/src/javaRestTest/java/org/elasticsearch/repositories/blobstore/testkit/analyze/S3RepositoryAnalysisRestIT.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import fixture.s3.S3HttpFixture;
1010

1111
import org.elasticsearch.common.settings.Settings;
12+
import org.elasticsearch.common.unit.ByteSizeValue;
1213
import org.elasticsearch.test.cluster.ElasticsearchCluster;
1314
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
1415
import org.junit.ClassRule;
@@ -59,6 +60,7 @@ protected Settings repositorySettings() {
5960
.put("bucket", bucket)
6061
.put("base_path", basePath)
6162
.put("delete_objects_max_size", between(1, 1000))
63+
.put("buffer_size", ByteSizeValue.ofMb(5)) // so some uploads are multipart ones
6264
.build();
6365
}
6466
}

x-pack/plugin/snapshot-repo-test-kit/src/test/java/org/elasticsearch/repositories/blobstore/testkit/analyze/AbstractRepositoryAnalysisRestTestCase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public void testRepositoryAnalysis() throws Exception {
2929
final Request request = new Request(HttpPost.METHOD_NAME, "/_snapshot/" + repository + "/_analyze");
3030
request.addParameter("blob_count", "10");
3131
request.addParameter("concurrency", "4");
32-
request.addParameter("max_blob_size", "1mb");
32+
request.addParameter("max_blob_size", randomFrom("1mb", "10mb"));
3333
request.addParameter("timeout", "120s");
3434
request.addParameter("seed", Long.toString(randomLong()));
3535
assertOK(client().performRequest(request));

0 commit comments

Comments
 (0)