Skip to content

Commit 66f9a7a

Browse files
committed
---
yaml --- r: 1687 b: refs/heads/master c: e08896c h: refs/heads/master i: 1685: 592cb92 1683: 444c327 1679: 0b42f88
1 parent de35987 commit 66f9a7a

17 files changed

Lines changed: 46 additions & 50 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: ae7c0e94a1fa9c5f95873838784e1bba10b4df31
2+
refs/heads/master: e08896cd79eeda392f65205ad16b473e2a61ba3b
33
refs/heads/travis: e21ee7b88a5edc3f3d8c71f90c3fc32abf7e8dd6
44
refs/heads/gh-pages: d1b373c30c176edc08692348167bec3a244bb823
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3

trunk/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java.svg)]( https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java.svg)
99
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
10-
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
1110

1211
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1312
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)

trunk/gcloud-java-bigquery/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Java idiomatic client for [Google Cloud BigQuery] (https://cloud.google.com/bigq
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)]( https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)
99
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
10-
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
1110

1211
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1312
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/bigquery/package-summary.html)

trunk/gcloud-java-bigquery/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
<dependency>
3131
<groupId>com.google.apis</groupId>
3232
<artifactId>google-api-services-bigquery</artifactId>
33-
<version>v2-rev261-1.21.0</version>
33+
<version>v2-rev254-1.21.0</version>
3434
<scope>compile</scope>
3535
<exclusions>
3636
<exclusion>
@@ -48,7 +48,7 @@
4848
<dependency>
4949
<groupId>org.easymock</groupId>
5050
<artifactId>easymock</artifactId>
51-
<version>3.4</version>
51+
<version>3.3</version>
5252
<scope>test</scope>
5353
</dependency>
5454
</dependencies>

trunk/gcloud-java-contrib/README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,6 @@ Google Cloud Java Contributions
33

44
Packages that provide higher-level abstraction/functionality for common gcloud-java use cases.
55

6-
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
7-
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
8-
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)]( https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)
9-
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
10-
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
11-
126
Quickstart
137
----------
148
If you are using Maven, add this to your pom.xml file

trunk/gcloud-java-core/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ This module provides common functionality required by service-specific modules o
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-core.svg)](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-core.svg)
99
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
10-
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
1110

1211
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1312
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html)

trunk/gcloud-java-core/pom.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@
3535
<dependency>
3636
<groupId>com.google.http-client</groupId>
3737
<artifactId>google-http-client</artifactId>
38-
<version>1.21.0</version>
38+
<version>1.20.0</version>
3939
<scope>compile</scope>
4040
</dependency>
4141
<dependency>
4242
<groupId>com.google.oauth-client</groupId>
4343
<artifactId>google-oauth-client</artifactId>
44-
<version>1.21.0</version>
44+
<version>1.20.0</version>
4545
<scope>compile</scope>
4646
</dependency>
4747
<dependency>
4848
<groupId>com.google.guava</groupId>
4949
<artifactId>guava</artifactId>
50-
<version>19.0</version>
50+
<version>18.0</version>
5151
</dependency>
5252
<dependency>
5353
<groupId>com.google.api-client</groupId>
5454
<artifactId>google-api-client-appengine</artifactId>
55-
<version>1.21.0</version>
55+
<version>1.20.0</version>
5656
<scope>compile</scope>
5757
<exclusions>
5858
<exclusion>
@@ -64,7 +64,7 @@
6464
<dependency>
6565
<groupId>com.google.http-client</groupId>
6666
<artifactId>google-http-client-jackson</artifactId>
67-
<version>1.21.0</version>
67+
<version>1.20.0</version>
6868
<scope>compile</scope>
6969
<exclusions>
7070
<exclusion>
@@ -82,19 +82,19 @@
8282
<dependency>
8383
<groupId>joda-time</groupId>
8484
<artifactId>joda-time</artifactId>
85-
<version>2.9.2</version>
85+
<version>2.8.2</version>
8686
<scope>compile</scope>
8787
</dependency>
8888
<dependency>
8989
<groupId>org.json</groupId>
9090
<artifactId>json</artifactId>
91-
<version>20151123</version>
91+
<version>20090211</version>
9292
<scope>compile</scope>
9393
</dependency>
9494
<dependency>
9595
<groupId>org.easymock</groupId>
9696
<artifactId>easymock</artifactId>
97-
<version>3.4</version>
97+
<version>3.3</version>
9898
<scope>test</scope>
9999
</dependency>
100100
</dependencies>

trunk/gcloud-java-datastore/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ Java idiomatic client for [Google Cloud Datastore] (https://cloud.google.com/dat
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-datastore.svg)]( https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-datastore.svg)
99
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
10-
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)
1110

1211
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
1312
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html)

trunk/gcloud-java-datastore/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
<dependency>
2525
<groupId>com.google.apis</groupId>
2626
<artifactId>google-api-services-datastore-protobuf</artifactId>
27-
<version>v1beta2-rev1-2.1.2</version>
27+
<version>v1beta2-rev1-4.0.0</version>
2828
<scope>compile</scope>
2929
<exclusions>
3030
<exclusion>
@@ -42,7 +42,7 @@
4242
<dependency>
4343
<groupId>org.easymock</groupId>
4444
<artifactId>easymock</artifactId>
45-
<version>3.4</version>
45+
<version>3.3</version>
4646
<scope>test</scope>
4747
</dependency>
4848
</dependencies>

trunk/gcloud-java-datastore/src/test/java/com/google/gcloud/datastore/DatastoreTest.java

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import com.google.api.services.datastore.DatastoreV1.RunQueryRequest;
3232
import com.google.api.services.datastore.DatastoreV1.RunQueryResponse;
3333
import com.google.common.collect.Iterators;
34+
import com.google.common.collect.Lists;
3435
import com.google.gcloud.RetryParams;
3536
import com.google.gcloud.datastore.Query.ResultType;
3637
import com.google.gcloud.datastore.StructuredQuery.OrderBy;
@@ -89,8 +90,8 @@ public class DatastoreTest {
8990
FullEntity.builder(INCOMPLETE_KEY2).set("str", STR_VALUE).set("bool", BOOL_VALUE)
9091
.set("list", LIST_VALUE1).build();
9192
private static final FullEntity<IncompleteKey> PARTIAL_ENTITY2 =
92-
FullEntity.builder(PARTIAL_ENTITY1).remove("str").set("bool", true).
93-
set("list", LIST_VALUE1.get()).build();
93+
FullEntity.builder(PARTIAL_ENTITY1).remove("str").set("bool", true)
94+
.set("list", LIST_VALUE1.get()).build();
9495
private static final FullEntity<IncompleteKey> PARTIAL_ENTITY3 =
9596
FullEntity.builder(PARTIAL_ENTITY1).key(IncompleteKey.builder(PROJECT_ID, KIND3).build())
9697
.build();
@@ -471,9 +472,13 @@ public void testQueryPaginationWithLimit() throws DatastoreException {
471472
EasyMock.expect(rpcFactoryMock.create(EasyMock.anyObject(DatastoreOptions.class)))
472473
.andReturn(rpcMock);
473474
List<RunQueryResponse> responses = buildResponsesForQueryPaginationWithLimit();
474-
for (int i = 0; i < responses.size(); i++) {
475+
List<ByteString> endCursors = Lists.newArrayListWithCapacity(responses.size());
476+
for (RunQueryResponse response: responses) {
475477
EasyMock.expect(rpcMock.runQuery(EasyMock.anyObject(RunQueryRequest.class)))
476-
.andReturn(responses.get(i));
478+
.andReturn(response);
479+
if (response.getBatch().getMoreResults() != QueryResultBatch.MoreResultsType.NOT_FINISHED) {
480+
endCursors.add(response.getBatch().getEndCursor());
481+
}
477482
}
478483
EasyMock.replay(rpcFactoryMock, rpcMock);
479484
Datastore mockDatastore = options.toBuilder()
@@ -483,6 +488,7 @@ public void testQueryPaginationWithLimit() throws DatastoreException {
483488
.service();
484489
int limit = 2;
485490
int totalCount = 0;
491+
Iterator<ByteString> cursorIter = endCursors.iterator();
486492
StructuredQuery<Entity> query = Query.entityQueryBuilder().limit(limit).build();
487493
while (true) {
488494
QueryResults<Entity> results = mockDatastore.run(query);
@@ -492,6 +498,9 @@ public void testQueryPaginationWithLimit() throws DatastoreException {
492498
resultCount++;
493499
totalCount++;
494500
}
501+
assertTrue(cursorIter.hasNext());
502+
Cursor expectedEndCursor = Cursor.copyFrom(cursorIter.next().toByteArray());
503+
assertEquals(expectedEndCursor, results.cursorAfter());
495504
if (resultCount < limit) {
496505
break;
497506
}
@@ -505,19 +514,20 @@ private List<RunQueryResponse> buildResponsesForQueryPaginationWithLimit() {
505514
Entity entity4 = Entity.builder(KEY4).set("value", StringValue.of("value")).build();
506515
Entity entity5 = Entity.builder(KEY5).set("value", "value").build();
507516
datastore.add(ENTITY3, entity4, entity5);
517+
DatastoreRpc datastoreRpc = datastore.options().rpc();
508518
List<RunQueryResponse> responses = new ArrayList<>();
509519
Query<Entity> query = Query.entityQueryBuilder().build();
510520
RunQueryRequest.Builder requestPb = RunQueryRequest.newBuilder();
511521
query.populatePb(requestPb);
512522
QueryResultBatch queryResultBatchPb = RunQueryResponse.newBuilder()
513-
.mergeFrom(((DatastoreImpl) datastore).runQuery(requestPb.build()))
523+
.mergeFrom(datastoreRpc.runQuery(requestPb.build()))
514524
.getBatch();
515525
QueryResultBatch queryResultBatchPb1 = QueryResultBatch.newBuilder()
516526
.mergeFrom(queryResultBatchPb)
517527
.setMoreResults(QueryResultBatch.MoreResultsType.NOT_FINISHED)
518528
.clearEntityResult()
519529
.addAllEntityResult(queryResultBatchPb.getEntityResultList().subList(0, 1))
520-
.setEndCursor(queryResultBatchPb.getEntityResultList().get(0).getCursor())
530+
.setEndCursor(ByteString.copyFromUtf8("a"))
521531
.build();
522532
responses.add(RunQueryResponse.newBuilder().setBatch(queryResultBatchPb1).build());
523533
QueryResultBatch queryResultBatchPb2 = QueryResultBatch.newBuilder()
@@ -534,15 +544,15 @@ private List<RunQueryResponse> buildResponsesForQueryPaginationWithLimit() {
534544
.setMoreResults(QueryResultBatch.MoreResultsType.MORE_RESULTS_AFTER_LIMIT)
535545
.clearEntityResult()
536546
.addAllEntityResult(queryResultBatchPb.getEntityResultList().subList(2, 4))
537-
.setEndCursor(queryResultBatchPb.getEntityResultList().get(3).getCursor())
547+
.setEndCursor(ByteString.copyFromUtf8("b"))
538548
.build();
539549
responses.add(RunQueryResponse.newBuilder().setBatch(queryResultBatchPb3).build());
540550
QueryResultBatch queryResultBatchPb4 = QueryResultBatch.newBuilder()
541551
.mergeFrom(queryResultBatchPb)
542552
.setMoreResults(QueryResultBatch.MoreResultsType.NO_MORE_RESULTS)
543553
.clearEntityResult()
544554
.addAllEntityResult(queryResultBatchPb.getEntityResultList().subList(4, 5))
545-
.setEndCursor(queryResultBatchPb.getEntityResultList().get(4).getCursor())
555+
.setEndCursor(ByteString.copyFromUtf8("c"))
546556
.build();
547557
responses.add(RunQueryResponse.newBuilder().setBatch(queryResultBatchPb4).build());
548558
return responses;

0 commit comments

Comments
 (0)