flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Knauf <konstantin.kn...@tngtech.com>
Subject Re: flink testing
Date Sun, 23 Apr 2017 17:38:52 GMT
+ user@flink (somehow I didn't reply to the list)

Hi Georg,

there are two classes "MultipleProgramsTestBase" and
"StreamingMultipeProgramsTestBase", which your integration tests can
extend from.

This will spin up a local Flink Mini-Cluster before the test execution
and tear it down afterwards.

I have also recently build a small Flink-JUnit rule available on Github
to make this a little bit easier and  more flexible [1]. The snapshot
version should be available in the sonatype open source repositories in
the next days. Let me know, if it seems useful to you.

This is for integration tests of our jobs or parts of the jobs though.
For unit tests we usually mock the RuntimeContext.



[1] https://github.com/knaufk/flink-junit

On 23.04.2017 17:19, Georg Heiler wrote:
> Spark testing base https://github.com/holdenk/spark-testing-base offers
> some Base classes to use when writing tests with Spark which make it
> simpler to write unit tests for functions in spark i.e. you do not
> manually need to instantiate a spark context / flink execution
> environment for each test case.
> You've written an awesome program in Spark and now its time to write
> some tests. Only you find yourself writing the code to setup and tear
> down local mode Spark in between each suite and you say to your self:
> This is not my beautiful code.
>     <https://github.com/holdenk/spark-testing-base#how>
> Ted Yu <yuzhihong@gmail.com <mailto:yuzhihong@gmail.com>> schrieb am
> So., 23. Apr. 2017 um 10:46 Uhr:
>     Please give more context by describing what spark-test-base does :-)
>     > On Apr 22, 2017, at 10:57 PM, Georg Heiler
>     <georg.kf.heiler@gmail.com <mailto:georg.kf.heiler@gmail.com>> wrote:
>     >
>     > Hi,
>     >
>     > is there something like spark-testing-base for flink as well?
>     >
>     > Cheers,
>     > Georg

Konstantin Knauf * konstantin.knauf@tngtech.com * +49-174-3413182
TNG Technology Consulting GmbH, Betastr. 13a, 85774 Unterföhring
Geschäftsführer: Henrik Klagges, Christoph Stock, Dr. Robert Dahlke
Sitz: Unterföhring * Amtsgericht München * HRB 135082

View raw message