From cefc9ddc94a8d7e5c79b9303b6ccd883245fbb91 Mon Sep 17 00:00:00 2001 From: Joakim Erdfelt Date: Fri, 20 Jul 2012 11:49:15 -0700 Subject: [PATCH] Rolling in @Slow into jetty-util --- .../org/eclipse/jetty/util/BlockingArrayQueueTest.java | 7 ++++++- .../java/org/eclipse/jetty/util/DateCacheTest.java | 10 +++++++--- .../test/java/org/eclipse/jetty/util/ScannerTest.java | 7 ++++++- .../jetty/util/thread/QueuedThreadPoolTest.java | 7 ++++++- 4 files changed, 25 insertions(+), 6 deletions(-) diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/BlockingArrayQueueTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/BlockingArrayQueueTest.java index 7daee8f5c55..d54c0467ec6 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/BlockingArrayQueueTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/BlockingArrayQueueTest.java @@ -22,9 +22,12 @@ import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.CyclicBarrier; import java.util.concurrent.TimeUnit; +import org.eclipse.jetty.toolchain.test.AdvancedRunner; +import org.eclipse.jetty.toolchain.test.annotation.Slow; import org.junit.Test; +import org.junit.runner.RunWith; - +@RunWith(AdvancedRunner.class) public class BlockingArrayQueueTest { @@ -138,6 +141,7 @@ public class BlockingArrayQueueTest } @Test + @Slow public void testTake() throws Exception { final String[] data=new String[4]; @@ -184,6 +188,7 @@ public class BlockingArrayQueueTest volatile boolean _running; @Test + @Slow public void testConcurrentAccess() throws Exception { final int THREADS=50; diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/DateCacheTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/DateCacheTest.java index ce05c0ac4c5..3f0a6556841 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/DateCacheTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/DateCacheTest.java @@ -20,17 +20,21 @@ import java.util.concurrent.TimeUnit; import junit.framework.Assert; +import org.eclipse.jetty.toolchain.test.AdvancedRunner; +import org.eclipse.jetty.toolchain.test.annotation.Slow; import org.junit.Test; +import org.junit.runner.RunWith; -/* ------------------------------------------------------------ */ -/** Util meta Tests. - * +/** + * Util meta Tests. */ +@RunWith(AdvancedRunner.class) public class DateCacheTest { /* ------------------------------------------------------------ */ @Test + @Slow public void testDateCache() throws Exception { //@WAS: Test t = new Test("org.eclipse.jetty.util.DateCache"); diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/ScannerTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/ScannerTest.java index 08011517c5c..617afdf9d0f 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/ScannerTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/ScannerTest.java @@ -1,4 +1,3 @@ -package org.eclipse.jetty.util; //======================================================================== //Copyright (c) 2006-2012 Mort Bay Consulting Pty. Ltd. //------------------------------------------------------------------------ @@ -11,6 +10,7 @@ package org.eclipse.jetty.util; //http://www.opensource.org/licenses/apache2.0.php //You may elect to redistribute this code under either of these licenses. //======================================================================== +package org.eclipse.jetty.util; import java.io.File; import java.io.FileOutputStream; @@ -19,16 +19,20 @@ import java.util.List; import java.util.concurrent.BlockingQueue; import java.util.concurrent.LinkedBlockingQueue; +import org.eclipse.jetty.toolchain.test.AdvancedRunner; import org.eclipse.jetty.toolchain.test.FS; import org.eclipse.jetty.toolchain.test.MavenTestingUtils; import org.eclipse.jetty.toolchain.test.OS; +import org.eclipse.jetty.toolchain.test.annotation.Slow; import org.eclipse.jetty.util.Scanner.Notification; import org.junit.AfterClass; import org.junit.Assert; import org.junit.Assume; import org.junit.BeforeClass; import org.junit.Test; +import org.junit.runner.RunWith; +@RunWith(AdvancedRunner.class) public class ScannerTest { static File _directory; @@ -97,6 +101,7 @@ public class ScannerTest } @Test + @Slow public void testAddedChangeRemove() throws Exception { // TODO needs to be further investigated diff --git a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/QueuedThreadPoolTest.java b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/QueuedThreadPoolTest.java index 0e29f33c2f9..dd4daf69eae 100644 --- a/jetty-util/src/test/java/org/eclipse/jetty/util/thread/QueuedThreadPoolTest.java +++ b/jetty-util/src/test/java/org/eclipse/jetty/util/thread/QueuedThreadPoolTest.java @@ -21,9 +21,12 @@ import java.util.concurrent.atomic.AtomicInteger; import junit.framework.Assert; +import org.eclipse.jetty.toolchain.test.AdvancedRunner; +import org.eclipse.jetty.toolchain.test.annotation.Slow; import org.junit.Test; +import org.junit.runner.RunWith; - +@RunWith(AdvancedRunner.class) public class QueuedThreadPoolTest { final AtomicInteger _jobs=new AtomicInteger(); @@ -62,6 +65,7 @@ public class QueuedThreadPoolTest @Test + @Slow public void testThreadPool() throws Exception { QueuedThreadPool tp= new QueuedThreadPool(); @@ -137,6 +141,7 @@ public class QueuedThreadPoolTest } @Test + @Slow public void testShrink() throws Exception { final AtomicInteger sleep = new AtomicInteger(100);