Details
-
New Feature
-
Status: Resolved
-
P2
-
Resolution: Fixed
-
None
Description
We should validate two things:
- DataflowAssert is not added to a pipeline that has already been run.
- The pipeline is run after the DataflowAssert is added.
If either of these are not validated, then it is possible that the test doesn't actually verify anything.
This code should throw an assertion error or fail in some other way.
Pipeline p = TestPipeline.create(); PCollection<Boolean> value = p.apply(Create.of(Boolean.FALSE)); p.run(); DataflowAssert.thatSingleton(value).isEqualTo(true);
but it would pass silently.
similarly, this code wills pass silently:
Pipeline p = TestPipeline.create(); PCollection<Boolean> value = p.apply(Create.of(Boolean.FALSE)); DataflowAssert.thatSingleton(value).isEqualTo(true);
Attachments
Issue Links
- links to