summaryrefslogtreecommitdiff
path: root/jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java
diff options
context:
space:
mode:
authorCalin Juravle <calin@google.com>2014-05-15 19:29:37 +0100
committerCalin Juravle <calin@google.com>2014-05-16 10:47:03 +0100
commit008167dfe7530e6a80066006633f2301d3eae012 (patch)
treecce2b94d7900b0c5f8a91832363109aaf9d06315 /jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java
parent6b3592a745f9ab6339421d0eaa2f665ce207376d (diff)
Fix jsr166 tests
Tests specified as static inner classes were failing because the CTS runner does not support them. The temporary fix is to promote all static inner test classes to top level classes. This should be reverted once the CTS runner is fixed. Bug: 13877168 Change-Id: Icb64d7d7fcf6202d54d6fe31d9e1c9a6a43a233b
Diffstat (limited to 'jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java')
-rw-r--r--jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java25
1 files changed, 25 insertions, 0 deletions
diff --git a/jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java b/jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java
new file mode 100644
index 0000000000..d6ed08188c
--- /dev/null
+++ b/jsr166-tests/src/test/java/jsr166/ArrayBlockingQueueFairTest.java
@@ -0,0 +1,25 @@
+/*
+ * Written by Doug Lea with assistance from members of JCP JSR-166
+ * Expert Group and released to the public domain, as explained at
+ * http://creativecommons.org/publicdomain/zero/1.0/
+ * Other contributors include Andrew Wright, Jeffrey Hayes,
+ * Pat Fisher, Mike Judd.
+ */
+
+package jsr166;
+
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+
+// In the upstream sources this class was nested inside ArrayBlockingQueueTests.
+// It was extracted to the top level because the CTS runner does not support
+// nested test classes. The same transformation was applied to all similar
+// classes from the jsr166 suite (see the parent CL for the complete list). This
+// should be reverted after CTS runner is fixed.
+public class ArrayBlockingQueueFairTest extends BlockingQueueTest {
+
+ protected BlockingQueue emptyCollection() {
+ return new ArrayBlockingQueue(SIZE, true);
+ }
+
+}