Hi, I would like to write few tests that would check the message flow in my Flink pipeline. I would like to base my test on [1].
My StreamJob class, that has the main method has all Sinks and Source pluggable. The implementations are based also on [1]. In all examples available online I can see that in the actual test method env.execute() is called, which starts deployment of a job. However in my case, the deployment of job takes some significant amount of time. This is caused by fact that we need to load some "special" libraries that should not be mocked for tests. That is why, we would like to call it only once, hence deploy the job on a MiniClsuter only once. My StreamJob.main method contains all pipeline setup plus call to env.execute(). However when I do that, for example when I initiate my job in another ClassRule method or BeforeClass method, I noticed that tests hangs. The thread from Junit is actually waiting on env.execute(). which in my case never ends. However the underlying minicluster is working fine. Questions: 1. what would be a preferred way to setup my tests, when I would like to deploy my StreamJobOnly once 2. how can i check if a cluster, used in my tests is ready, and Job deployment is finished. [1] https://ci.apache.org/projects/flink/flink-docs-stable/dev/stream/testing.html#testing-flink-jobs -- Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/