Skip to content

Commit 4d58f07

Browse files
author
Frank Natividad
committed
revert local test
1 parent e733cc5 commit 4d58f07

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

google-cloud-storage/src/test/java/com/google/cloud/storage/it/ITStorageTest.java

+6-11
Original file line numberDiff line numberDiff line change
@@ -3611,22 +3611,17 @@ public void testWriterWithKmsKeyName() throws IOException {
36113611
// Write an empty object with a kmsKeyName.
36123612
String blobName = "test-empty-blob";
36133613
BlobInfo blobInfo = BlobInfo.newBuilder(BUCKET, blobName).build();
3614-
Storage storage =
3615-
StorageOptions.newBuilder().setHost("http://localhost:8080").build().getService();
3616-
storage.create(BucketInfo.of(BUCKET));
36173614
Blob blob =
3618-
storage.create(blobInfo); // , Storage.BlobTargetOption.kmsKeyName(kmsKeyOneResourcePath));
3615+
storage.create(blobInfo, Storage.BlobTargetOption.kmsKeyName(kmsKeyOneResourcePath));
36193616

36203617
// Create a writer using blob that already has metadata received from Storage API.
3621-
int numberOfBytes = 0;
3622-
int iterations = 1024 * 1024;
3618+
int numberOfBytes;
36233619
try (WriteChannel writer = blob.writer()) {
3624-
for (int i = 0; i < iterations; i++) {
3625-
byte[] content = BLOB_STRING_CONTENT.getBytes(UTF_8);
3626-
numberOfBytes += writer.write(ByteBuffer.wrap(content, 0, content.length));
3627-
}
3620+
byte[] content = BLOB_STRING_CONTENT.getBytes(UTF_8);
3621+
numberOfBytes = writer.write(ByteBuffer.wrap(content, 0, content.length));
36283622
}
3629-
assertThat(numberOfBytes).isEqualTo(27 * iterations);
3623+
assertThat(numberOfBytes).isEqualTo(27);
3624+
assertThat(blob.getKmsKeyName()).isNotNull();
36303625
assertThat(storage.delete(BUCKET, blobName)).isTrue();
36313626
}
36323627
}

0 commit comments

Comments
 (0)