Suppress stacks during sweeper test

This commit is contained in:
Greg Wilkins 2016-07-07 08:32:36 +10:00
parent 8a12915dac
commit 322fe73869

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.util.thread;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
import org.eclipse.jetty.util.log.StacklessLogging;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
@ -90,6 +91,8 @@ public class SweeperTest
@Test
public void testSweepThrows() throws Exception
{
try(StacklessLogging scope = new StacklessLogging(Sweeper.class))
{
long period = 500;
final CountDownLatch taskLatch = new CountDownLatch(2);
@ -111,7 +114,7 @@ public class SweeperTest
public boolean sweep()
{
sweepLatch.countDown();
throw new NullPointerException();
throw new NullPointerException("Test exception!");
}
});
@ -122,3 +125,4 @@ public class SweeperTest
sweeper.stop();
}
}
}