kristoffSC commented on code in PR #21052:
URL: https://github.com/apache/flink/pull/21052#discussion_r997246807
##########
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/sink/committables/CommittableCollectorSerializerTest.java:
##########
@@ -134,55 +190,78 @@ void
testAlignSubtaskCommittableManagerCheckpointWithCheckpointCommittableManage
.isEqualTo(committableManager.getCheckpointId());
}
+ /**
+ * @param assertMessageHeading prefix used for assertion fail message.
+ * @param subtaskId subtaskId to get {@link SubtaskCommittableManager}
from {@link
+ * CheckpointCommittableManagerImpl}
+ * @param expectedNumberOfSubtasks expected number of subtasks for {@link
CommittableSummary}
+ * @param committableCollector collector to get {@link
CheckpointCommittableManager}s from.
+ * @param expectedCommittableSize expected number of {@link
CheckpointCommittableManager}.
+ * @param expectedNumberOfPendingRequestsPerCommittable expected number of
pending request per
+ * {@link SubtaskCommittableManager}.
+ */
private void assertCommittableCollector(
String assertMessageHeading,
int subtaskId,
- int numberOfSubtasks,
- CommittableCollector<Integer> committableCollector) {
+ int expectedNumberOfSubtasks,
+ CommittableCollector<Integer> committableCollector,
+ int expectedCommittableSize,
+ Object[] expectedNumberOfPendingRequestsPerCommittable) {
Review Comment:
yeah,
the thing is that depends on the test, `testCommittableCollectorV2SerDe` or
`testCommittablesForSameSubtaskIdV2SerDe`
we will have `assertPendingRequests` will expect single Integer or List of
integers, one for each restored committable for the same subtaskId.
I wanted to reuse the assertions from `testCommittableCollectorV2SerDe`
which basically checks for the same things but with different expected values.
Im using Objects arrays because `assertThat(...).containsExactly(...) var
args (single value or array)`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]