Skip to content

Commit

Permalink
[FLINK-22338][table-planner] Clear watermark output when test finishe…
Browse files Browse the repository at this point in the history
…d for FromElementSourceFunctionWithWatermark

This closes apache#15659
  • Loading branch information
fsk119 authored Apr 19, 2021
1 parent ef8803a commit 5fbf0d7
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ static List<String> getRawResults(String tableName) {
}

static List<Watermark> getWatermarks(String tableName) {
return watermarkHistory.getOrDefault(tableName, new ArrayList<>());
synchronized (TestValuesTableFactory.class) {
if (watermarkHistory.containsKey(tableName)) {
return new ArrayList<>(watermarkHistory.get(tableName));
} else {
return Collections.emptyList();
}
}
}

static List<String> getResults(String tableName) {
Expand All @@ -122,6 +128,7 @@ static void clearResults() {
globalRawResult.clear();
globalUpsertResult.clear();
globalRetractResult.clear();
watermarkHistory.clear();
}
}

Expand Down

0 comments on commit 5fbf0d7

Please sign in to comment.