Skip to content

Commit eef0c38

Browse files
authored
Enable test of nsType with a collection view (#1702)
The reason the test is failing is due to a unified test runner bug, in which a view is created only when a pipeline is specified. This fixes the test runner bug and enables the test. JAVA-5769
1 parent 3758661 commit eef0c38

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedCrudHelper.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1381,10 +1381,10 @@ public OperationResult executeCreateCollection(final BsonDocument operation) {
13811381
// In Java driver there is a separate method for creating a view, but in the unified test CRUD format
13821382
// views and collections are both created with the createCollection operation. We use the createView
13831383
// method if the requisite arguments are present.
1384-
if (arguments.containsKey("viewOn") && arguments.containsKey("pipeline")) {
1384+
if (arguments.containsKey("viewOn")) {
13851385
String viewOn = arguments.getString("viewOn").getValue();
13861386
List<BsonDocument> pipeline =
1387-
arguments.getArray("pipeline").stream().map(BsonValue::asDocument).collect(toList());
1387+
arguments.getArray("pipeline", new BsonArray()).stream().map(BsonValue::asDocument).collect(toList());
13881388

13891389
for (Map.Entry<String, BsonValue> cur : arguments.entrySet()) {
13901390
switch (cur.getKey()) {

driver-sync/src/test/functional/com/mongodb/client/unified/UnifiedTestModifications.java

-3
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,6 @@ public static void applyCustomizations(final TestDef def) {
6363
.test("change-streams", "change-streams-errors", "Change Stream should error when an invalid aggregation stage is passed in")
6464
.test("change-streams", "change-streams-errors", "The watch helper must not throw a custom exception when executed against a single server topology, but instead depend on a server error");
6565

66-
def.skipJira("https://jira.mongodb.org/browse/JAVA-5769")
67-
.test("change-streams", "change-streams-nsType", "nsType is present when creating views");
68-
6966
// client-side-operation-timeout (CSOT)
7067

7168
def.skipNoncompliantReactive("No good way to fulfill tryNext() requirement with a Publisher<T>")

0 commit comments

Comments
 (0)