Skip to content

Commit c79335a

Browse files
committed
attempt to force multipart for testing
1 parent 4830958 commit c79335a

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

modules/repository-s3/src/internalClusterTest/java/org/elasticsearch/repositories/s3/S3RepositoryThirdPartyTests.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ protected Settings nodeSettings() {
109109
protected void createRepository(String repoName) {
110110
Settings.Builder settings = Settings.builder()
111111
.put("bucket", System.getProperty("test.s3.bucket"))
112-
.put("base_path", System.getProperty("test.s3.base", "testpath"));
112+
.put("base_path", System.getProperty("test.s3.base", "testpath"))
113+
.put("buffer_size", S3Repository.MIN_PART_SIZE_USING_MULTIPART);
113114
final String endpoint = USE_FIXTURE ? minio.getAddress() : System.getProperty("test.s3.endpoint");
114115
if (endpoint != null) {
115116
settings.put("endpoint", endpoint);

test/framework/src/main/java/org/elasticsearch/repositories/AbstractThirdPartyRepositoryTestCase.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,9 +290,12 @@ public void testIndexLatest() throws Exception {
290290

291291
public void testReadFromPositionWithLength() {
292292
final var blobName = randomIdentifier();
293-
final var blobBytes = randomBytesReference(randomIntBetween(100, 2_000));
293+
// forcing multipart temporarily
294+
final var blobBytes = randomBytesReference(randomIntBetween(25 * 1024 * 1024 + 100, 25 * 1024 * 1024 + 2_000));
294295

295296
final var repository = getRepository();
297+
logger.info("---> uploading blob of size {}", blobBytes.length());
298+
logger.info("repository buffer size: {}", repository.getReadBufferSizeInBytes());
296299
executeOnBlobStore(repository, blobStore -> {
297300
blobStore.writeBlob(randomPurpose(), blobName, blobBytes, true);
298301
return null;

0 commit comments

Comments
 (0)