Github user StephanEwen commented on a diff in the pull request:
https://github.com/apache/flink/pull/3523#discussion_r106161900
--- Diff:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java
---
@@ -640,6 +640,74 @@ public SubtaskState answer(InvocationOnMock
invocation) throws Throwable {
verify(rawOperatorStateHandle).discardState();
}
+ /**
+ * FLINK-5985
+ *
+ * This test ensures that empty snapshots (no op/keyed stated
whatsoever) will be reported as stateless tasks. This
+ * happens by translating an empty {@link SubtaskState} into reporting
'null' to #acknowledgeCheckpoint.
+ */
+ @Test
+ public void testEmptySubtaskStateLeadsToStatelessAcknowledgment()
throws Exception {
--- End diff --
I think the fact that this test requires extensive whiteboxing means we
should move the whole `CheckpointOperation` to a separate class and make it
work independent of `StreamTask`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---