edgent-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject [2/4] incubator-quarks git commit: synchronized lists used in concurrent tests
Date Mon, 13 Jun 2016 18:06:40 GMT
synchronized lists used in concurrent tests


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

Branch: refs/heads/master
Commit: f3b0cf9eb5d9b77a9c6fd90490b09daea4037c5c
Parents: 7924cc6
Author: Michael Dye <mdye@us.ibm.com>
Authored: Thu Jun 9 13:02:59 2016 -0600
Committer: Michael Dye <mdye@us.ibm.com>
Committed: Thu Jun 9 13:02:59 2016 -0600

----------------------------------------------------------------------
 api/window/src/test/java/quarks/test/window/WindowTest.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-quarks/blob/f3b0cf9e/api/window/src/test/java/quarks/test/window/WindowTest.java
----------------------------------------------------------------------
diff --git a/api/window/src/test/java/quarks/test/window/WindowTest.java b/api/window/src/test/java/quarks/test/window/WindowTest.java
index 71bebc8..f93889e 100644
--- a/api/window/src/test/java/quarks/test/window/WindowTest.java
+++ b/api/window/src/test/java/quarks/test/window/WindowTest.java
@@ -266,8 +266,8 @@ public class WindowTest {
 		// Timing variances on shared machines can cause this test to fail
     	assumeTrue(!Boolean.getBoolean("quarks.build.ci"));
 
-        List<Long> diffs = new ArrayList<>();
-        List<Boolean> initialized = new ArrayList<>();
+        List<Long> diffs = Collections.synchronizedList(new ArrayList<>());
+        List<Boolean> initialized = Collections.synchronizedList(new ArrayList<>());
         initialized.add(false);
         
         Window<Long, Integer, InsertionTimeList<Long>> window = // new TimeWindowImpl<Long,
Integer, LinkedList<Long>>(
@@ -384,7 +384,7 @@ public class WindowTest {
     @SuppressWarnings("serial")
     @Test
     public void timeBatchEnsureUnique() throws InterruptedException{
-        List<List<Integer>> batches = new LinkedList<>();
+        List<List<Integer>> batches = Collections.synchronizedList(new LinkedList<>());
 
         ScheduledExecutorService ses = new ScheduledThreadPoolExecutor(5);
         Window<Integer, Integer, List<Integer>> window =


Mime
View raw message