Thanks Anton, this is a really important topic because currently we have no
way at all for unit-testing IOs that emit unbounded output.
Regardless of the proposed PAssert API itself, even if we just figure out a
way to make the pipeline terminate on some condition from within the
pipeline, that'll be great.

On Mon, May 14, 2018 at 1:57 PM Anton Kedin <[email protected]> wrote:

> Hi,
>
> While working on an integration test
> <https://github.com/apache/beam/pull/5347> for Pubsub-related
> functionality I couldn't find a good solution to test the pipelines that
> don't reliably stop.
>
> I propose we extend PAssert to support eventual verification. In this
> case some success/failure predicate is being constantly evaluated against
> all elements of the pipeline until it's met. At that point the result gets
> communicated to the main program/test.
>
> Example API:
>
> *PAssert  .thatEventually(pcollection)  .containsInAnyOrder(e1, e2, e3)
>  .synchronizingOver(signalOverPubsub());  .timeoutAfter(10 min)*
>
> Details doc
> <https://docs.google.com/document/d/1X_3KH_6QyfOSnh5kNK-fHlkEDrwPVpA2RnRggMMxhUk/edit#heading=h.i3owzq4bs63l>
>
> Comments, thoughts, things that I missed?
>
> Regards,
> Anton
>

Reply via email to