How does forking work with respect to the @BeforeClass/@AfterClass methods? My use case is that I have some setup code that creates file/db connections that are not destroyed until the jvm is shutdown, therefore I can't cleanup in the @After method. However it doesn't work using @BeforeClass/@AfterClass either and I'm clear why.
I tried using all the fork modes with no success. What's the way to run tests in one process and then cleanup in another?
