You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by dw...@apache.org on 2021/10/22 10:25:10 UTC
[flink] branch master updated (86c9694 -> f070f0d)
This is an automated email from the ASF dual-hosted git repository.
dwysakowicz pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.
from 86c9694 [FLINK-24019][build][dist] Package Scala APIs separately
new 63bd6a3 [refactor][tests] Expanded toString for TestEventSource
new f070f0d [FLINK-24331][tests] Forbid to finish the TestEventSource if it has not sent at least one value
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../operators/lifecycle/event/OperatorFinishedEvent.java | 15 +++++++++++++++
.../operators/lifecycle/graph/TestEventSource.java | 3 ++-
2 files changed, 17 insertions(+), 1 deletion(-)
[flink] 01/02: [refactor][tests] Expanded toString for
TestEventSource
Posted by dw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 63bd6a382807f4f09c07567d82c2e112d63fe28c
Author: Anton Kalashnikov <ka...@yandex.ru>
AuthorDate: Thu Oct 21 15:34:03 2021 +0200
[refactor][tests] Expanded toString for TestEventSource
---
.../operators/lifecycle/event/OperatorFinishedEvent.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/event/OperatorFinishedEvent.java b/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/event/OperatorFinishedEvent.java
index ce9bf0b..becc6fb 100644
--- a/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/event/OperatorFinishedEvent.java
+++ b/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/event/OperatorFinishedEvent.java
@@ -50,9 +50,19 @@ public class OperatorFinishedEvent extends TestEvent {
return receiveInfo.forUpstream(upstreamID).getOrDefault(upstreamIndex, -1L);
}
+ @Override
+ public String toString() {
+ return String.format("%s; receive=%s; sent=%d", super.toString(), receiveInfo, lastSent);
+ }
+
/** LastVertexDataInfo. */
public static class LastVertexDataInfo implements Serializable {
public final Map<Integer, Long> bySubtask = new HashMap<>();
+
+ @Override
+ public String toString() {
+ return String.valueOf(bySubtask);
+ }
}
/** LastReceivedVertexDataInfo. */
@@ -67,5 +77,10 @@ public class OperatorFinishedEvent extends TestEvent {
return byUpstreamOperatorID.getOrDefault(upstreamID, new LastVertexDataInfo())
.bySubtask;
}
+
+ @Override
+ public String toString() {
+ return String.valueOf(byUpstreamOperatorID);
+ }
}
}
[flink] 02/02: [FLINK-24331][tests] Forbid to finish the
TestEventSource if it has not sent at least one value
Posted by dw...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
dwysakowicz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
commit f070f0d9ae19275b1e32c2587209d7d8ae87b57e
Author: Anton Kalashnikov <ka...@yandex.ru>
AuthorDate: Thu Oct 21 16:59:18 2021 +0200
[FLINK-24331][tests] Forbid to finish the TestEventSource if it has not sent at least one value
---
.../flink/runtime/operators/lifecycle/graph/TestEventSource.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/graph/TestEventSource.java b/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/graph/TestEventSource.java
index 0d32de9..1badb6a 100644
--- a/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/graph/TestEventSource.java
+++ b/flink-tests/src/test/java/org/apache/flink/runtime/operators/lifecycle/graph/TestEventSource.java
@@ -73,7 +73,8 @@ class TestEventSource extends RichSourceFunction<TestDataElement>
public void run(SourceContext<TestDataElement> ctx) {
long lastSent = 0;
while (isRunning) {
- TestCommand cmd = scheduledCommands.poll();
+ // Don't finish the source if it has not sent at least one value.
+ TestCommand cmd = lastSent == 0 ? null : scheduledCommands.poll();
if (cmd == FINISH_SOURCES) {
ack(cmd);
isRunning = false;