Skip to content

Commit 24790f3

Browse files
committed
StatusServiceTest: clean up context setup/teardown
1 parent 9dc359a commit 24790f3

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/test/java/org/scijava/app/StatusServiceTest.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import java.util.concurrent.BlockingQueue;
4141
import java.util.concurrent.TimeUnit;
4242

43+
import org.junit.After;
4344
import org.junit.Before;
4445
import org.junit.Test;
4546
import org.scijava.AbstractContextual;
@@ -79,14 +80,19 @@ private void eventHandler(final StatusEvent e) {
7980
}
8081

8182
@Before
82-
public void setUp() throws Exception {
83+
public void setUp() {
8384
context = new Context();
8485
queue = new ArrayBlockingQueue<>(10);
8586
statusListener = new StatusListener();
8687
statusListener.setContext(context);
8788
ss = statusListener.statusService;
8889
}
8990

91+
@After
92+
public void tearDown() {
93+
context.dispose();
94+
}
95+
9096
@Test
9197
public void testShowProgress() throws InterruptedException {
9298
ss.showProgress(15, 45);

0 commit comments

Comments
 (0)