6908348: java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java get OOME for unbounded queues
authordl
Wed, 23 Dec 2009 15:57:14 -0800
changeset 4530 cff832a17f52
parent 4529 9403e6487c07
child 4531 3a9206343ab2
6908348: java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java get OOME for unbounded queues Reviewed-by: martin, dholmes
jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java
--- a/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java	Wed Dec 23 17:17:16 2009 +0000
+++ b/jdk/test/java/util/concurrent/BlockingQueue/CancelledProducerConsumerLoops.java	Wed Dec 23 15:57:14 2009 -0800
@@ -146,13 +146,13 @@
         oneRun(new ArrayBlockingQueue<Integer>(CAPACITY), pairs, iters);
         oneRun(new LinkedBlockingQueue<Integer>(CAPACITY), pairs, iters);
         oneRun(new LinkedBlockingDeque<Integer>(CAPACITY), pairs, iters);
+        oneRun(new SynchronousQueue<Integer>(), pairs, iters / 8);
+
+        /* TODO: unbounded queue implementations are prone to OOME
+        oneRun(new PriorityBlockingQueue<Integer>(iters / 2 * pairs), pairs, iters / 4);
         oneRun(new LinkedTransferQueue<Integer>(), pairs, iters);
         oneRun(new LTQasSQ<Integer>(), pairs, iters);
         oneRun(new HalfSyncLTQ<Integer>(), pairs, iters);
-        oneRun(new SynchronousQueue<Integer>(), pairs, iters / 8);
-
-        /* PriorityBlockingQueue is unbounded
-        oneRun(new PriorityBlockingQueue<Integer>(iters / 2 * pairs), pairs, iters / 4);
         */
     }