Skip to content

Commit 437456c

Browse files
committed
Update tests/constant to reflect new chunk size
1 parent 36a0620 commit 437456c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

modules/repository-gcs/src/main/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobStore.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@
7575
class GoogleCloudStorageBlobStore implements BlobStore {
7676

7777
/**
78-
* see com.google.cloud.BaseWriteChannel#DEFAULT_CHUNK_SIZE
78+
* see {@link com.google.cloud.storage.BaseStorageWriteChannel#chunkSize}
7979
*/
80-
static final int SDK_DEFAULT_CHUNK_SIZE = 60 * 256 * 1024;
80+
static final int SDK_DEFAULT_CHUNK_SIZE = Math.toIntExact(ByteSizeValue.ofMb(16).getBytes());
8181

8282
private static final Logger logger = LogManager.getLogger(GoogleCloudStorageBlobStore.class);
8383

modules/repository-gcs/src/test/java/org/elasticsearch/repositories/gcs/GoogleCloudStorageBlobContainerRetriesTests.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,7 @@ public void testWriteBlobWithReadTimeouts() {
328328
}
329329

330330
public void testWriteLargeBlob() throws IOException {
331-
// See {@link com.google.cloud.storage.BaseStorageWriteChannel.BaseStorageWriteChannel}
332-
final int defaultChunkSize = Math.toIntExact(ByteSizeValue.ofMb(16).getBytes());
331+
final int defaultChunkSize = GoogleCloudStorageBlobStore.SDK_DEFAULT_CHUNK_SIZE;
333332
final int nbChunks = randomIntBetween(3, 5);
334333
final int lastChunkSize = randomIntBetween(1, defaultChunkSize - 1);
335334
final int totalChunks = nbChunks + 1;

0 commit comments

Comments
 (0)