flink-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lofifnc <alexander.k...@mni.thm.de>
Subject Re: Published test artifacts for flink streaming
Date Mon, 23 Nov 2015 08:20:22 GMT
Hi Nick,

This is easily achievable using the framework I provide.
createDataStream(Input<T> input) does actually return a DataStreamSource<T>.
And the call of assertStream(DataStream<T> datastream, OutputMatcher<T>
matcher) just attaches a TestSink<T> to the datastream, but you can create
the test sink manually with: new TestSink<T>(OutputMatcher<T> matcher). So
your able to test a builder function with wireFoo(testSource,testSink).

I personally compose my data flows into smaller functions KeyedDataStream
sessionize(DataStream stream) so I'm able to test my pipelines partially.
But if I wan't to adjust a setting inside these functions differently for
test than for production if have to add it to the parameters of my function:
KeyedDataStream sessionize(DataStream stream, Long sessionTimeout). Another
solution would be to use Flinks ParameterTool and use a different
configuration for test and production.

Best, Alex.  


View this message in context: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/Published-test-artifacts-for-flink-streaming-tp3379p3638.html
Sent from the Apache Flink User Mailing List archive. mailing list archive at Nabble.com.

View raw message