gaoyunhaii commented on a change in pull request #15055:
URL: https://github.com/apache/flink/pull/15055#discussion_r657807592
##########
File path:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/MultipleInputStreamTaskChainedSourcesCheckpointingTest.java
##########
@@ -237,51 +241,76 @@ public void testOnlyOneSource() throws Exception {
@Test
public void testRpcTriggerCheckpointWithSourceChain() throws Exception {
- AtomicReference<Future<?>> lastCheckpointTriggerFuture = new
AtomicReference<>();
-
- try (StreamTaskMailboxTestHarness<String> testHarness =
- new StreamTaskMailboxTestHarnessBuilder<>(
- env ->
- new MultipleInputStreamTaskTest
-
.HoldingOnAfterInvokeMultipleInputStreamTask(
- env,
lastCheckpointTriggerFuture),
- BasicTypeInfo.STRING_TYPE_INFO)
- .modifyStreamConfig(config ->
config.setCheckpointingEnabled(true))
-
.modifyExecutionConfig(ExecutionConfig::enableObjectReuse)
- .addInput(BasicTypeInfo.INT_TYPE_INFO)
- .addInput(BasicTypeInfo.STRING_TYPE_INFO)
- .addSourceInput(
- new SourceOperatorFactory<>(
- new
MultipleInputStreamTaskTest.LifeCycleTrackingMockSource(
- Boundedness.BOUNDED, 1),
- WatermarkStrategy.noWatermarks()))
- .addSourceInput(
- new SourceOperatorFactory<>(
- new
MultipleInputStreamTaskTest.LifeCycleTrackingMockSource(
- Boundedness.BOUNDED, 1),
- WatermarkStrategy.noWatermarks()))
- .setupOperatorChain(new
MapToStringMultipleInputOperatorFactory(4))
-
.finishForSingletonOperatorChain(StringSerializer.INSTANCE)
- .build()) {
-
- testHarness
- .getStreamTask()
- .getCheckpointCoordinator()
- .setEnableCheckpointAfterTasksFinished(true);
-
- // TODO: Would add the test of part of channel finished after we
are able to
- // complement pending checkpoints when received
EndOfPartitionEvent.
-
- testHarness.processEvent(EndOfPartitionEvent.INSTANCE, 0, 0);
- testHarness.processEvent(EndOfPartitionEvent.INSTANCE, 1, 0);
- Future<Boolean> checkpointFuture = triggerCheckpoint(testHarness,
4);
- lastCheckpointTriggerFuture.set(checkpointFuture);
-
- // The checkpoint 4 would be triggered successfully.
- // TODO: Would also check the checkpoint succeed after we also
waiting
- // for the asynchronous step to finish on finish.
- testHarness.finishProcessing();
- assertTrue(checkpointFuture.isDone());
+ ResultPartition[] partitionWriters = new ResultPartition[2];
Review comment:
Sorry it is my mistake that I forget to connect the `PartitionWriters`
to the `StreamTask`... I modified the tests and now it would fail if the
partition writers is not connected...
--
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]