rkhachatryan commented on a change in pull request #18976:
URL: https://github.com/apache/flink/pull/18976#discussion_r820568630



##########
File path: 
flink-dstl/flink-dstl-dfs/src/test/java/org/apache/flink/changelog/fs/TestingStateChangeUploader.java
##########
@@ -26,22 +27,30 @@
 import java.util.List;
 import java.util.concurrent.CopyOnWriteArrayList;
 
+import static java.util.Collections.emptyMap;
 import static java.util.stream.Collectors.toList;
 
 class TestingStateChangeUploader implements StateChangeUploader {
     private final Collection<StateChangeSet> uploaded = new 
CopyOnWriteArrayList<>();
-    private final List<UploadTask> tasks = new CopyOnWriteArrayList<>();
+    private final List<UploadTask> tasks;
     private boolean closed;
 
+    TestingStateChangeUploader() {
+        tasks = new CopyOnWriteArrayList<>();

Review comment:
       Depending on the test setup, its `upload` method can be called by a 
dedicated upload thread, and other accesses are from the main thread (e.g. 
`BatchingStateChangeUploadSchedulerTest`).




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to