Skip to content

Commit a4fa9ba

Browse files
committed
Setup CI against enterprise
1 parent 09225e4 commit a4fa9ba

File tree

12 files changed

+334
-108
lines changed

12 files changed

+334
-108
lines changed

.kokoro/presubmit/graalvm-c.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env_vars: {
1313

1414
env_vars: {
1515
key: "INTEGRATION_TEST_ARGS"
16-
value: "-DFIRESTORE_EDITION=standard"
16+
value: "-DFIRESTORE_NAMED_DATABASE=enterprise -DFIRESTORE_EDITION=enterprise"
1717
}
1818

1919
# TODO: remove this after we've migrated all tests and scripts

.kokoro/presubmit/graalvm-native-c.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env_vars: {
1313

1414
env_vars: {
1515
key: "INTEGRATION_TEST_ARGS"
16-
value: "-DFIRESTORE_EDITION=standard"
16+
value: "-DFIRESTORE_NAMED_DATABASE=enterprise -DFIRESTORE_EDITION=enterprise"
1717
}
1818

1919
env_vars: {

.kokoro/presubmit/integration-named-db.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ env_vars: {
1313

1414
env_vars: {
1515
key: "INTEGRATION_TEST_ARGS"
16-
value: "-DFIRESTORE_NAMED_DATABASE=test-db -DFIRESTORE_EDITION=standard"
16+
value: "-DFIRESTORE_NAMED_DATABASE=enterprise -DFIRESTORE_EDITION=enterprise"
1717
}
1818

1919
env_vars: {

google-cloud-firestore/src/main/java/com/google/cloud/firestore/AggregateQuery.java

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -91,20 +91,20 @@ public Query getQuery() {
9191
Pipeline pipeline() {
9292
Pipeline pipeline = getQuery().pipeline();
9393

94-
List<BooleanExpression> existsExprs =
95-
this.aggregateFieldList.stream()
96-
.map(PipelineUtils::toPipelineExistsExpr)
97-
.filter(Objects::nonNull)
98-
.collect(Collectors.toList());
99-
if (existsExprs.size() == 1) {
100-
pipeline = pipeline.where(existsExprs.get(0));
101-
} else if (existsExprs.size() > 1) {
102-
pipeline =
103-
pipeline.where(
104-
and(
105-
existsExprs.get(0),
106-
existsExprs.subList(1, existsExprs.size()).toArray(new BooleanExpression[0])));
107-
}
94+
// List<BooleanExpression> existsExprs =
95+
// this.aggregateFieldList.stream()
96+
// .map(PipelineUtils::toPipelineExistsExpr)
97+
// .filter(Objects::nonNull)
98+
// .collect(Collectors.toList());
99+
// if (existsExprs.size() == 1) {
100+
// pipeline = pipeline.where(existsExprs.get(0));
101+
// } else if (existsExprs.size() > 1) {
102+
// pipeline =
103+
// pipeline.where(
104+
// and(
105+
// existsExprs.get(0),
106+
// existsExprs.subList(1, existsExprs.size()).toArray(new BooleanExpression[0])));
107+
// }
108108

109109
return pipeline.aggregate(
110110
this.aggregateFieldList.stream()

google-cloud-firestore/src/test/java/com/google/cloud/firestore/it/ITPipelineTest.java

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,15 +1161,20 @@ public void testLogicalAndComparisonOperators() throws Exception {
11611161
.pipeline()
11621162
.createFrom(collection)
11631163
.where(
1164-
Expression.notEqualAny("genre", Lists.newArrayList("Romance", "Dystopian", null)))
1164+
Expression.notEqualAny(
1165+
"genre", Lists.newArrayList("Science Fiction", "Romance", "Dystopian", null)))
11651166
.select("genre")
11661167
.distinct("genre")
11671168
.execute()
11681169
.get()
11691170
.getResults();
11701171
assertThat(data(results))
11711172
.containsExactly(
1172-
map("genre", "Science Fiction"),
1173+
// This is somewhat surprising because the pipeline did ask specifically for genre not
1174+
// equal to null,
1175+
// however at the later distinct stage, UNSET is grouped as null and thus null appears
1176+
// in the result.
1177+
map("genre", null),
11731178
map("genre", "Magical Realism"),
11741179
map("genre", "Fantasy"),
11751180
map("genre", "Psychological Thriller"),
@@ -1236,10 +1241,9 @@ public void testChecks() throws Exception {
12361241
.select(
12371242
field("rating").equal(nullValue()).as("ratingIsNull"),
12381243
field("rating").equal(Double.NaN).as("ratingIsNaN"),
1244+
// arrayGet("title", 0) evaluates to UNSET
12391245
arrayGet("title", 0).isError().as("isError"),
1240-
arrayGet("title", 0)
1241-
.ifError(constant("was error"), constant("was not error"))
1242-
.as("ifError"),
1246+
arrayGet("title", 0).ifError(constant("was error")).as("ifError"),
12431247
field("foo").isAbsent().as("isAbsent"),
12441248
field("title").notEqual(nullValue()).as("titleIsNotNull"),
12451249
field("cost").notEqual(Double.NaN).as("costIsNotNan"),
@@ -1259,8 +1263,6 @@ public void testChecks() throws Exception {
12591263
false,
12601264
"isError",
12611265
false,
1262-
"ifError",
1263-
"was not error",
12641266
"isAbsent",
12651267
true,
12661268
"titleIsNotNull",

0 commit comments

Comments
 (0)