File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed
google-cloud-datastore/src/test/java/com/google/cloud/datastore/it Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments