flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gyf...@apache.org
Subject flink git commit: [FLINK-1566] [streaming] Made WindowIntegrationTests thread-safe
Date Tue, 17 Feb 2015 19:16:46 GMT
Repository: flink
Updated Branches:
  refs/heads/master ac7bf4279 -> a1c9244b0


[FLINK-1566] [streaming] Made WindowIntegrationTests thread-safe


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/a1c9244b
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/a1c9244b
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/a1c9244b

Branch: refs/heads/master
Commit: a1c9244b04ca49a7ae333fbaccac46d32afe8f65
Parents: ac7bf42
Author: Gyula Fora <gyfora@apache.org>
Authored: Tue Feb 17 16:57:11 2015 +0100
Committer: Gyula Fora <gyfora@apache.org>
Committed: Tue Feb 17 18:05:55 2015 +0100

----------------------------------------------------------------------
 .../operator/windowing/WindowIntegrationTest.java      | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/a1c9244b/flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/invokable/operator/windowing/WindowIntegrationTest.java
----------------------------------------------------------------------
diff --git a/flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/invokable/operator/windowing/WindowIntegrationTest.java
b/flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/invokable/operator/windowing/WindowIntegrationTest.java
index 05ac5fd..893510b 100755
--- a/flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/invokable/operator/windowing/WindowIntegrationTest.java
+++ b/flink-staging/flink-streaming/flink-streaming-core/src/test/java/org/apache/flink/streaming/api/invokable/operator/windowing/WindowIntegrationTest.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 
 import java.io.Serializable;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashSet;
 import java.util.List;
 
@@ -154,7 +155,8 @@ public class WindowIntegrationTest implements Serializable {
 	@SuppressWarnings("serial")
 	private static class CentralSink1 implements SinkFunction<StreamWindow<Integer>>
{
 
-		public static List<StreamWindow<Integer>> windows = new ArrayList<StreamWindow<Integer>>();
+		public static List<StreamWindow<Integer>> windows = Collections
+				.synchronizedList(new ArrayList<StreamWindow<Integer>>());
 
 		@Override
 		public void invoke(StreamWindow<Integer> value) throws Exception {
@@ -166,7 +168,8 @@ public class WindowIntegrationTest implements Serializable {
 	@SuppressWarnings("serial")
 	private static class CentralSink2 implements SinkFunction<StreamWindow<Integer>>
{
 
-		public static List<StreamWindow<Integer>> windows = new ArrayList<StreamWindow<Integer>>();
+		public static List<StreamWindow<Integer>> windows = Collections
+				.synchronizedList(new ArrayList<StreamWindow<Integer>>());
 
 		@Override
 		public void invoke(StreamWindow<Integer> value) throws Exception {
@@ -178,7 +181,8 @@ public class WindowIntegrationTest implements Serializable {
 	@SuppressWarnings("serial")
 	private static class DistributedSink1 implements SinkFunction<StreamWindow<Integer>>
{
 
-		public static List<StreamWindow<Integer>> windows = new ArrayList<StreamWindow<Integer>>();
+		public static List<StreamWindow<Integer>> windows = Collections
+				.synchronizedList(new ArrayList<StreamWindow<Integer>>());
 
 		@Override
 		public void invoke(StreamWindow<Integer> value) throws Exception {
@@ -190,7 +194,8 @@ public class WindowIntegrationTest implements Serializable {
 	@SuppressWarnings("serial")
 	private static class DistributedSink2 implements SinkFunction<StreamWindow<Integer>>
{
 
-		public static List<StreamWindow<Integer>> windows = new ArrayList<StreamWindow<Integer>>();
+		public static List<StreamWindow<Integer>> windows = Collections
+				.synchronizedList(new ArrayList<StreamWindow<Integer>>());
 
 		@Override
 		public void invoke(StreamWindow<Integer> value) throws Exception {


Mime
View raw message