Skip to content

Commit 30b7d64

Browse files
authored
Exercise multi-part uploads in S3 repo analysis tests (#125669) (#125730)
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 30b7f1b commit 30b7d64

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

+2
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

+1-1
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)