Junit VCS teardown

I have a series of unit tests I run in both IntelliJ and from the command line using Maven. These tests populate the VCS and then perform various operations. Randomly, one or the other test will fail. The symptom seems to be that data committed in one session is not visible in another. If I run each test individually, they will never fail. It is only running the entire suite of tests in the test class. Is there a way to completely re-initialize the VCS before each test to ensure that there is no lingering effect from one test affecting another? Thanks.

0 votes

0 answers