mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 12:29:31 +00:00
Suppress stacks during sweeper test
This commit is contained in:
parent
8a12915dac
commit
322fe73869
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user