|
40 | 40 | import com.google.cloud.storage.spi.StorageRpcFactory; |
41 | 41 | import com.google.cloud.storage.spi.v1.StorageRpc; |
42 | 42 | import com.google.common.collect.ImmutableMap; |
| 43 | +import com.google.common.collect.Maps; |
43 | 44 | import java.io.IOException; |
44 | 45 | import java.math.BigInteger; |
45 | 46 | import java.net.MalformedURLException; |
@@ -333,9 +334,10 @@ public void testWriteWithRetryAndObjectMetadata() throws IOException { |
333 | 334 | .andThrow(socketClosedException); |
334 | 335 | expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(-1L); |
335 | 336 | expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(-1L); |
336 | | - expect(storageRpcMock.get(BLOB_INFO.toPb(), null)).andThrow(socketClosedException); |
| 337 | + expect(storageRpcMock.get(BLOB_INFO.toPb(), Maps.newEnumMap(StorageRpc.Option.class))) |
| 338 | + .andThrow(socketClosedException); |
337 | 339 | expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(-1L); |
338 | | - expect(storageRpcMock.get(BLOB_INFO.toPb(), null)) |
| 340 | + expect(storageRpcMock.get(BLOB_INFO.toPb(), Maps.newEnumMap(StorageRpc.Option.class))) |
339 | 341 | .andReturn(BLOB_INFO.toPb().setSize(BigInteger.valueOf(MIN_CHUNK_SIZE))); |
340 | 342 | replay(storageRpcMock); |
341 | 343 | writer = new BlobWriteChannel(options, BLOB_INFO, EMPTY_RPC_OPTIONS); |
@@ -485,7 +487,7 @@ public void testWriteWithLastFlushRetryChunkButCompleted() throws IOException { |
485 | 487 | eq(true))) |
486 | 488 | .andThrow(socketClosedException); |
487 | 489 | expect(storageRpcMock.getCurrentUploadOffset(eq(UPLOAD_ID))).andReturn(-1L); |
488 | | - expect(storageRpcMock.get(BLOB_INFO.toPb(), null)) |
| 490 | + expect(storageRpcMock.get(BLOB_INFO.toPb(), Maps.newEnumMap(StorageRpc.Option.class))) |
489 | 491 | .andReturn(BLOB_INFO.toPb().setSize(BigInteger.valueOf(MIN_CHUNK_SIZE))); |
490 | 492 | replay(storageRpcMock); |
491 | 493 | writer = new BlobWriteChannel(options, BLOB_INFO, EMPTY_RPC_OPTIONS); |
|
0 commit comments