Hi,

I'm testing to see how I can build an integration test for a Beam
application that uses PubSub.

So I start the Google provided PubSub emulator, create things like topic
and subscription, put in some validation messages and then run the job
against that and verify the data that comes out.
I'm logging the events to the screen and there I see the data coming in and
being processed.

The problem I have is that I have not been able to figure out how to
cleanly terminate this stream after it has processed all my messages.

I have also inserted some 'stop' messages to enable triggering a "we're
done, you can stop now".

I've been digging through documentation and the apis and found nothing that
works.

This does not work: pipeline.run().waitUntilFinish(Duration.millis(2000))

I have tried setting the timestamp of those to MAX_LONG and
TIMESTAMP_MAX_VALUE but that yielded exceptions.

So far I have not been able to figure out how to tell the TestPipeline:
Finish what you have and shutdown.

How do I do that?

-- 
Best regards / Met vriendelijke groeten,

Niels Basjes

Reply via email to