This is an automated email from the ASF dual-hosted git repository. dianfu pushed a commit to branch release-1.11 in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/release-1.11 by this push: new c5194d1 [FLINK-17990][python] Fix the test of ArrowSourceFunctionTestBase.testParallelProcessing to use synchronized list c5194d1 is described below commit c5194d1c913b6e536347a8a1049deb3ec701e168 Author: Dian Fu <dia...@apache.org> AuthorDate: Fri May 29 17:24:41 2020 +0800 [FLINK-17990][python] Fix the test of ArrowSourceFunctionTestBase.testParallelProcessing to use synchronized list This closes #12404. --- .../flink/table/runtime/arrow/sources/ArrowSourceFunctionTestBase.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flink-python/src/test/java/org/apache/flink/table/runtime/arrow/sources/ArrowSourceFunctionTestBase.java b/flink-python/src/test/java/org/apache/flink/table/runtime/arrow/sources/ArrowSourceFunctionTestBase.java index 1abd47f..6e51e4d 100644 --- a/flink-python/src/test/java/org/apache/flink/table/runtime/arrow/sources/ArrowSourceFunctionTestBase.java +++ b/flink-python/src/test/java/org/apache/flink/table/runtime/arrow/sources/ArrowSourceFunctionTestBase.java @@ -47,6 +47,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; import java.nio.channels.Channels; import java.util.ArrayList; +import java.util.Collections; import java.util.Comparator; import java.util.List; import java.util.concurrent.atomic.AtomicInteger; @@ -174,7 +175,7 @@ public abstract class ArrowSourceFunctionTestBase<T> { final Throwable[] error = new Throwable[2]; final OneShotLatch latch = new OneShotLatch(); final AtomicInteger numOfEmittedElements = new AtomicInteger(0); - final List<T> results = new ArrayList<>(); + final List<T> results = Collections.synchronizedList(new ArrayList<>()); // run the source asynchronously Thread runner = new Thread(() -> {