| @@ -68,9 +68,8 @@ List<Map<String, Object>> data(List results) { |
|
|
| 68 |
68 |
@Before |
| 69 |
69 |
public void setup() throws Exception { |
| 70 |
70 |
assumeFalse( |
| 71 |
|
-"This test suite only runs against the Enterprise edition in the Nightly environment.", |
| 72 |
|
- !getFirestoreEdition().equals(FirestoreEdition.ENTERPRISE) |
| 73 |
|
- | |
|
71 |
+"This test suite only runs against the Enterprise edition.", |
|
72 |
+ !getFirestoreEdition().equals(FirestoreEdition.ENTERPRISE)); |
| 74 |
73 |
if (collection != null) { |
| 75 |
74 |
return; |
| 76 |
75 |
} |
| @@ -984,20 +983,20 @@ public void testDirectExecutionOfSubcollectionPipeline() throws Exception { |
|
|
| 984 |
983 |
|
| 985 |
984 |
@Test |
| 986 |
985 |
public void testUnionWithSubqueryThrows() throws Exception { |
| 987 |
|
-IllegalArgumentException e = |
|
986 |
+ExecutionException e = |
| 988 |
987 |
assertThrows( |
| 989 |
|
-IllegalArgumentException.class, |
|
988 |
+ExecutionException.class, |
| 990 |
989 |
() -> { |
| 991 |
990 |
firestore |
| 992 |
991 |
.pipeline() |
| 993 |
992 |
.collection(collection.getPath()) |
| 994 |
|
- .union(PipelineSource.subcollection("subcollection")); |
|
993 |
+ .union(PipelineSource.subcollection("subcollection")) |
|
994 |
+ .execute() |
|
995 |
+ .get(); |
| 995 |
996 |
}); |
| 996 |
997 |
|
| 997 |
|
-assertThat(e) |
| 998 |
|
- .hasMessageThat() |
|
998 |
+assertThat(e.getCause().getMessage()) |
| 999 |
999 |
.contains( |
| 1000 |
|
-"Union only supports combining root pipelines, doesn't support relative scope Pipeline" |
| 1001 |
|
- + " like relative subcollection pipeline"); |
|
1000 |
+"The 'subcollection(...)' stage can only be used at the start of a nested pipeline."); |
| 1002 |
1001 |
} |
| 1003 |
1002 |
} |