Skip to content

Commit 229fc25

Browse files
committed
add some more ITs
1 parent 6d6a799 commit 229fc25

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

google-cloud-datastore/src/test/java/com/google/cloud/datastore/it/ITDatastoreTest.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,24 @@ public void testQueryProfile() {
422422

423423
assertPlanSummary(resultsAggregation.getExplainMetrics().get().getPlanSummary());
424424
assertExecutionStats(resultsAggregation.getExplainMetrics().get().getExecutionStats().get());
425+
426+
AggregationQuery aggregationQuery2 =
427+
Query.newAggregationQueryBuilder().over(simpleOrQuery).addAggregation(count()).build();
428+
AggregationResults resultsAggregation2 =
429+
datastore.runAggregation(aggregationQuery2, ExplainOptions.newBuilder().build());
430+
431+
Truth.assertThat(resultsAggregation2.size() > 0).isFalse();
432+
433+
assertPlanSummary(resultsAggregation2.getExplainMetrics().get().getPlanSummary());
434+
Truth.assertThat(resultsAggregation2.getExplainMetrics().get().getExecutionStats().isPresent())
435+
.isFalse();
436+
437+
AggregationQuery aggregationQuery3 =
438+
Query.newAggregationQueryBuilder().over(simpleOrQuery).addAggregation(count()).build();
439+
AggregationResults resultsAggregation3 = datastore.runAggregation(aggregationQuery3);
440+
441+
Truth.assertThat(resultsAggregation3.size() > 0).isTrue();
442+
Truth.assertThat(resultsAggregation3.getExplainMetrics().isPresent()).isFalse();
425443
}
426444

427445
@Test

0 commit comments

Comments
 (0)