DataflowAssert (Google Cloud Dataflow SDK 1.9.1 API)

Google Cloud Dataflow SDK for Java, version 1.9.1

Class DataflowAssert

  • public class DataflowAssert
    extends Object
    An assertion on the contents of a PCollection incorporated into the pipeline. Such an assertion can be checked no matter what kind of PipelineRunner is used.

    Note that the DataflowAssert call must precede the call to

    Examples of use:

     Pipeline p = TestPipeline.create();
     PCollection<String> output =
          .apply(ParDo.of(new TestDoFn()));
         .containsInAnyOrder("out1", "out2", "out3");
     PCollection<Integer> ints = ...
     PCollection<Integer> sum =
         .apply(Combine.globally(new SumInts()));

    JUnit and Hamcrest must be linked in by any code that uses DataflowAssert.

Send feedback about...

Cloud Dataflow