Skip to content

Commit

Permalink
[FLINK-24331][tests] Forbid to finish the TestEventSource if it has n…
Browse files Browse the repository at this point in the history
…ot sent at least one value
  • Loading branch information
akalash authored and dawidwys committed Oct 22, 2021
1 parent 63bd6a3 commit f070f0d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ public void open(Configuration parameters) throws Exception {
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;
Expand Down

0 comments on commit f070f0d

Please sign in to comment.