Repository: groovy
Updated Branches:
  refs/heads/master 50f60cbf7 -> f8fb6e734


Refine `ConcurrentLinkedHashMapTest`


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

Branch: refs/heads/master
Commit: f8fb6e73410091c6ff42ee116086ddb3495813c6
Parents: 50f60cb
Author: sunlan <[email protected]>
Authored: Tue Jan 23 21:36:26 2018 +0800
Committer: sunlan <[email protected]>
Committed: Tue Jan 23 21:36:26 2018 +0800

----------------------------------------------------------------------
 .../concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/f8fb6e73/src/test/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java
----------------------------------------------------------------------
diff --git 
a/src/test/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java
 
b/src/test/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java
index 6af32bd..f20372d 100644
--- 
a/src/test/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java
+++ 
b/src/test/java/org/apache/groovy/util/concurrentlinkedhashmap/ConcurrentLinkedHashMapTest.java
@@ -53,7 +53,7 @@ public class ConcurrentLinkedHashMapTest {
                 .maximumWeightedCapacity(3)
                 .build();
 
-        final int threadNum = 20;
+        final int threadNum = 5;
         final CountDownLatch countDownLatch = new CountDownLatch(1);
         final CountDownLatch countDownLatch2 = new CountDownLatch(threadNum);
 
@@ -64,15 +64,15 @@ public class ConcurrentLinkedHashMapTest {
                     countDownLatch.await();
 
                     if (num != 0 && num != 1 && num != 2) {
-                        Thread.sleep(100);
+                        Thread.sleep(300);
                     }
 
                     if (num == 1) {
-                        Thread.sleep(30);
+                        Thread.sleep(50);
                     }
 
                     if (num == 2) {
-                        Thread.sleep(60);
+                        Thread.sleep(150);
                     }
 
                     m.computeIfAbsent(num % 3, k -> num);

Reply via email to