Quick JUnit question. I\'m running some unit tests that involve starting up the GUI and doing a load of stuff.
I would like to see the results after the test to conf
How about using a countdownlatch which you count down.
private static CountDownLatch countdown = new CountDownLatch(1);
@AfterClass
public static void tearDownClass() throws Exception {
countdown.await();
}
Then somewhere else in your code you count down latch on event.
countdown.countDown();
When countdown.countDown()
is called then countdown.await()
will continue.