mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +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.CountDownLatch;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
|
import org.eclipse.jetty.util.log.StacklessLogging;
|
||||||
import org.junit.After;
|
import org.junit.After;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
@ -90,6 +91,8 @@ public class SweeperTest
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testSweepThrows() throws Exception
|
public void testSweepThrows() throws Exception
|
||||||
|
{
|
||||||
|
try(StacklessLogging scope = new StacklessLogging(Sweeper.class))
|
||||||
{
|
{
|
||||||
long period = 500;
|
long period = 500;
|
||||||
final CountDownLatch taskLatch = new CountDownLatch(2);
|
final CountDownLatch taskLatch = new CountDownLatch(2);
|
||||||
@ -111,7 +114,7 @@ public class SweeperTest
|
|||||||
public boolean sweep()
|
public boolean sweep()
|
||||||
{
|
{
|
||||||
sweepLatch.countDown();
|
sweepLatch.countDown();
|
||||||
throw new NullPointerException();
|
throw new NullPointerException("Test exception!");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -121,4 +124,5 @@ public class SweeperTest
|
|||||||
|
|
||||||
sweeper.stop();
|
sweeper.stop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user