Good afternoon,
After Reading the official flink testing documentation
(https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/stream/testing.html)
I was able to develop tests for a ProcessFunction, using a Test Harness,
something like this:
pendingPartitionBuilder = new PendingPartitionBuilder(":::some_name", "")
testHarness =
new
OneInputStreamOperatorTestHarness[StaticAdequacyTilePublishedData,PendingPartition](
new
ProcessOperator[StaticAdequacyTilePublishedData,PendingPartition](pendingPartitionBuilder)
)
testHarness.open()
now, I’m trying to do the same for a ProcessAllWindowFunction.
First I realized I can’t use TestHarness for ProcessAllWindowFunction, because
it doesn’t have a processElement method. In this case, what unit test strategy
should I follow?
Diogo Araújo | Rockstar Developer
[email protected]<mailto:[email protected]>
+351 912882824
[Critical TechWorks]
Rua do Campo Alegre, nº 17, piso 0 | 4150-177 Porto
www.criticaltechworks.com<https://www.criticaltechworks.com/>
[Critical TechWorks @ Instagram] <https://www.instagram.com/criticaltechworks/>
[Critical TechWorks @ LinkedIn]
<https://www.linkedin.com/company/criticaltechworks/> [Critical TechWorks @
Twitter] <https://twitter.com/ctechworks> [Critical TechWorks @ Facebook]
<https://www.facebook.com/CriticalTechWorks/>
From: Diogo Araújo <[email protected]>
Date: Thursday, 31 October 2019 at 16:55
To: "[email protected]" <[email protected]>
Subject: Unit testing for ProcessAllWindowFunction
Good afternoon,
After Reading the official flink testing documentation
(https://ci.apache.org/projects/flink/flink-docs-release-1.9/dev/stream/testing.html)
I was able to develop tests for a ProcessFunction, using a Test Harness,
something like this:
pendingPartitionBuilder = new PendingPartitionBuilder(":::some_name", "")
testHarness =
new OneInputStreamOperatorTestHarness[StaticAdequacyTilePublishedData,
PendingPartition](
new ProcessOperator[StaticAdequacyTilePublishedData,
PendingPartition](pendingPartitionBuilder)
)
testHarness.open()
now, I’m trying to do the same for a ProcessAllWindowFunction.
First I realized I can’t use TestHarness for ProcessAllWindowFunction, because
it doesn’t have a processElement method. In this case, what unit test strategy
should I follow?
Diogo Araújo | Rockstar Developer
[email protected]<mailto:[email protected]>
+351 912882824
[Critical TechWorks]
Rua do Campo Alegre, nº 17, piso 0 | 4150-177 Porto
www.criticaltechworks.com<https://www.criticaltechworks.com/>
[Critical TechWorks @ Instagram] <https://www.instagram.com/criticaltechworks/>
[Critical TechWorks @ LinkedIn]
<https://www.linkedin.com/company/criticaltechworks/> [Critical TechWorks @
Twitter] <https://twitter.com/ctechworks> [Critical TechWorks @ Facebook]
<https://www.facebook.com/CriticalTechWorks/>