Enable test of nsType with a collection view by jyemin · Pull Request #1702 · mongodb/mongo-java-driver

@jyemin

The reason this test fails is due to a unified test runner bug, in which a view is created only when a pipeline is specified.

JAVA-5769

@jyemin

The reason this test was failing is due to a unified test runner bug,
in which a view was created only when a pipeline was specified.

JAVA-5679

jyemin

String viewOn = arguments.getString("viewOn").getValue();
List<BsonDocument> pipeline =
arguments.getArray("pipeline").stream().map(BsonValue::asDocument).collect(toList());
arguments.getArray("pipeline", new BsonArray()).stream().map(BsonValue::asDocument).collect(toList());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If no pipeline provided, use an empty one.

@rozza

LGTM - note I edited the description to point to the correct ticket JAVA-5769

rozza