Skip to content

Commit 078dd09

Browse files
committed
Merge pull request #44 from aozarov/master
fix build
2 parents d4368c5 + 425ae6f commit 078dd09

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

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
}

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)