Rolling in @Slow into jetty-util

This commit is contained in:
Joakim Erdfelt 2012-07-20 11:49:15 -07:00
parent d60e03b575
commit cefc9ddc94
4 changed files with 25 additions and 6 deletions

View File

@ -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;

View File

@ -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");

View File

@ -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

View File

@ -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);