Skip to content

Commit 3c67d2f

Browse files
committed
---
yaml --- r: 5977 b: refs/heads/tswast-patch-1 c: 425ae6f h: refs/heads/master i: 5975: 7bbdde0
1 parent 02e8d64 commit 3c67d2f

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,5 @@ refs/tags/v0.18.0: 9d193c4c4b9d1c6f21515dd8e50836b9194ec9bb
5757
refs/tags/v0.19.0: e67b56e4d8dad5f9a7b38c9b2107c23c828f2ed5
5858
refs/tags/v0.20.0: 839f7fb7156535146aa1cb2c5aadd8d375d854e8
5959
refs/tags/v0.20.1: 370471f437f1f4f68a11e068df5cd6bf39edb1fa
60-
refs/heads/tswast-patch-1: d4368c56ea9599f1ec82c02972d2e8b34587eca5
60+
refs/heads/tswast-patch-1: 425ae6f5d6d6eaacbcd51c304505dc829183441a
6161
refs/heads/pubsub-streaming-pull: 19262b752ee874eb2ca3b950eb2aef44d5a5267b

branches/tswast-patch-1/src/main/java/com/google/gcloud/storage/StorageService.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,4 +425,6 @@ public static Builder builder() {
425425
* @throws StorageServiceException upon failure
426426
*/
427427
BlobWriteChannel writer(Blob blob, BlobTargetOption... options);
428+
429+
428430
}

branches/tswast-patch-1/src/test/java/com/google/gcloud/datastore/DatastoreServiceTest.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import com.google.gcloud.datastore.StructuredQuery.PropertyFilter;
3636
import com.google.gcloud.spi.DatastoreRpc;
3737
import com.google.gcloud.spi.DatastoreRpc.DatastoreRpcException.Reason;
38+
import com.google.gcloud.spi.DatastoreRpcFactory;
3839

3940
import org.easymock.EasyMock;
4041
import org.junit.AfterClass;
@@ -637,18 +638,21 @@ public void testRetires() throws Exception {
637638
DatastoreV1.LookupRequest.newBuilder().addKey(KEY1.toPb()).build();
638639
DatastoreV1.LookupResponse responsePb = DatastoreV1.LookupResponse.newBuilder()
639640
.addFound(EntityResult.newBuilder().setEntity(ENTITY1.toPb())).build();
640-
DatastoreRpc mock = EasyMock.createStrictMock(DatastoreRpc.class);
641-
EasyMock.expect(mock.lookup(requestPb))
641+
DatastoreRpcFactory rpcFactoryMock = EasyMock.createStrictMock(DatastoreRpcFactory.class);
642+
DatastoreRpc rpcMock = EasyMock.createStrictMock(DatastoreRpc.class);
643+
EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(DatastoreServiceOptions.class)))
644+
.andReturn(rpcMock);
645+
EasyMock.expect(rpcMock.lookup(requestPb))
642646
.andThrow(new DatastoreRpc.DatastoreRpcException(Reason.UNAVAILABLE))
643647
.andReturn(responsePb);
644-
EasyMock.replay(mock);
648+
EasyMock.replay(rpcFactoryMock, rpcMock);
645649
DatastoreServiceOptions options = this.options.toBuilder()
646650
.retryParams(RetryParams.getDefaultInstance())
647-
.datastoreRpc(mock)
651+
.serviceRpcFactory(rpcFactoryMock)
648652
.build();
649653
DatastoreService datastore = DatastoreServiceFactory.instance().get(options);
650654
Entity entity = datastore.get(KEY1);
651655
assertEquals(ENTITY1, entity);
652-
EasyMock.verify(mock);
656+
EasyMock.verify(rpcFactoryMock, rpcMock);
653657
}
654658
}

0 commit comments

Comments
 (0)