8162627: Miscellaneous changes imported from jsr166 CVS 2016-08
authordl
Mon, 15 Aug 2016 09:16:31 -0700
changeset 40280 5542e4584972
parent 40279 7a1e94e544d6
child 40281 4a7a2f1f7812
8162627: Miscellaneous changes imported from jsr166 CVS 2016-08 Reviewed-by: martin, psandoz
jdk/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java
jdk/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java
jdk/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java
jdk/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java
jdk/test/java/util/concurrent/tck/ForkJoinTask8Test.java
jdk/test/java/util/concurrent/tck/ForkJoinTaskTest.java
jdk/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java
jdk/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java
jdk/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java
--- a/jdk/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -492,7 +492,7 @@
             }});
 
         await(aboutToWait);
-        waitForThreadToEnterWaitState(t, LONG_DELAY_MS);
+        waitForThreadToEnterWaitState(t);
         t.interrupt();
         awaitTermination(t);
         checkEmpty(q);
--- a/jdk/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Mon Aug 15 09:16:31 2016 -0700
@@ -433,7 +433,7 @@
         Integer[] elements = new Integer[size];
         for (int i = 0; i < size; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         Iterator it = full.iterator();
@@ -523,7 +523,7 @@
         Integer[] elements = new Integer[size];
         for (int i = 0; i < size; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         assertTrue(Arrays.asList(elements).containsAll(Arrays.asList(full.toArray())));
@@ -553,7 +553,7 @@
         Integer[] elements = new Integer[size];
         for (int i = 0; i < size; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         Arrays.fill(a, 42);
--- a/jdk/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -291,7 +291,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedArray(elements);
 
         Iterator it = full.iterator();
@@ -459,7 +459,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedArray(elements);
 
         assertTrue(Arrays.equals(elements, full.toArray()));
@@ -487,7 +487,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedArray(elements);
 
         Arrays.fill(a, 42);
--- a/jdk/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -251,7 +251,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         Iterator it = full.iterator();
@@ -338,7 +338,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         assertTrue(Arrays.equals(elements, full.toArray()));
@@ -366,7 +366,7 @@
         Integer[] elements = new Integer[SIZE];
         for (int i = 0; i < SIZE; i++)
             elements[i] = i;
-        Collections.shuffle(Arrays.asList(elements));
+        shuffle(elements);
         Collection<Integer> full = populatedSet(elements);
 
         Arrays.fill(a, 42);
--- a/jdk/test/java/util/concurrent/tck/ForkJoinTask8Test.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/ForkJoinTask8Test.java	Mon Aug 15 09:16:31 2016 -0700
@@ -948,7 +948,7 @@
                 AsyncFib f = new AsyncFib(8);
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 ForkJoinTask[] tasks = { f, g };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks[0], tasks[1]);
                     shouldThrow();
@@ -975,7 +975,7 @@
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks[0], tasks[1], tasks[2]);
                     shouldThrow();
@@ -1002,7 +1002,7 @@
                 AsyncFib g = new AsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(Arrays.asList(tasks));
                     shouldThrow();
--- a/jdk/test/java/util/concurrent/tck/ForkJoinTaskTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/ForkJoinTaskTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -924,7 +924,7 @@
                 AsyncFib f = new AsyncFib(8);
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 ForkJoinTask[] tasks = { f, g };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks);
                     shouldThrow();
@@ -962,7 +962,7 @@
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks);
                     shouldThrow();
@@ -983,10 +983,9 @@
                 AsyncFib g = new AsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                List taskList = Arrays.asList(tasks);
-                Collections.shuffle(taskList);
+                shuffle(tasks);
                 try {
-                    invokeAll(taskList);
+                    invokeAll(Arrays.asList(tasks));
                     shouldThrow();
                 } catch (FJException success) {
                     checkCompletedAbnormally(f, success);
@@ -1594,7 +1593,7 @@
                 AsyncFib f = new AsyncFib(8);
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 ForkJoinTask[] tasks = { f, g };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks);
                     shouldThrow();
@@ -1632,7 +1631,7 @@
                 FailingAsyncFib g = new FailingAsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                Collections.shuffle(Arrays.asList(tasks));
+                shuffle(tasks);
                 try {
                     invokeAll(tasks);
                     shouldThrow();
@@ -1653,10 +1652,9 @@
                 AsyncFib g = new AsyncFib(9);
                 AsyncFib h = new AsyncFib(7);
                 ForkJoinTask[] tasks = { f, g, h };
-                List taskList = Arrays.asList(tasks);
-                Collections.shuffle(taskList);
+                shuffle(tasks);
                 try {
-                    invokeAll(taskList);
+                    invokeAll(Arrays.asList(tasks));
                     shouldThrow();
                 } catch (FJException success) {
                     checkCompletedAbnormally(f, success);
--- a/jdk/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -792,7 +792,7 @@
             }});
 
         aboutToWait.await();
-        waitForThreadToEnterWaitState(t, LONG_DELAY_MS);
+        waitForThreadToEnterWaitState(t);
         t.interrupt();
         awaitTermination(t);
         checkEmpty(q);
--- a/jdk/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -481,7 +481,7 @@
             }});
 
         await(aboutToWait);
-        waitForThreadToEnterWaitState(t, LONG_DELAY_MS);
+        waitForThreadToEnterWaitState(t);
         t.interrupt();
         awaitTermination(t);
         checkEmpty(q);
--- a/jdk/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/jdk/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java	Mon Aug 15 09:16:31 2016 -0700
@@ -437,7 +437,7 @@
             }});
 
         aboutToWait.await();
-        waitForThreadToEnterWaitState(t, LONG_DELAY_MS);
+        waitForThreadToEnterWaitState(t);
         t.interrupt();
         awaitTermination(t);
     }