AHeise commented on a change in pull request #11098: [FLINK-16060][task]
Implement working StreamMultipleInputProcessor
URL: https://github.com/apache/flink/pull/11098#discussion_r383195008
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/InputSelectionTest.java
##########
@@ -75,6 +75,28 @@ public void testFairSelectNextIndexOutOf2() {
assertEquals(-1,
InputSelection.SECOND.fairSelectNextIndexOutOf2(0, 1));
}
+ @Test
+ public void testFairSelectNextIndex() {
+ assertEquals(1, InputSelection.ALL.fairSelectNextIndex(7, 0));
+ assertEquals(2, InputSelection.ALL.fairSelectNextIndex(7, 1));
+ assertEquals(0, InputSelection.ALL.fairSelectNextIndex(7, 2));
+ assertEquals(1, InputSelection.ALL.fairSelectNextIndex(7, 0));
+
+ // combination of selection and availability is supposed to be
3, 5, 8:
+ InputSelection selection = new
Builder().select(2).select(3).select(4).select(5).select(8).build();
Review comment:
This looks like two test cases to me.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services