changeset 15375:d5c70818cd8a jdk-9+132

8162627: Miscellaneous changes imported from jsr166 CVS 2016-08 Reviewed-by: martin, psandoz
author dl
date Mon, 15 Aug 2016 09:16:31 -0700
parents 0f38fe68fe79
children 496a116876a3 7ed792ba0b17
files test/java/util/concurrent/tck/ArrayBlockingQueueTest.java test/java/util/concurrent/tck/ConcurrentHashMap8Test.java test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java test/java/util/concurrent/tck/ForkJoinTask8Test.java test/java/util/concurrent/tck/ForkJoinTaskTest.java test/java/util/concurrent/tck/LinkedBlockingDequeTest.java test/java/util/concurrent/tck/LinkedBlockingQueueTest.java test/java/util/concurrent/tck/PriorityBlockingQueueTest.java
diffstat 9 files changed, 24 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/util/concurrent/tck/ArrayBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/ConcurrentHashMap8Test.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/CopyOnWriteArrayListTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/CopyOnWriteArraySetTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/ForkJoinTask8Test.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/ForkJoinTaskTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/LinkedBlockingDequeTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/LinkedBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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/test/java/util/concurrent/tck/PriorityBlockingQueueTest.java	Mon Aug 15 09:13:22 2016 -0700
+++ b/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);
     }