I’m running into a problem with migrating an old maven project to gradle. The project has some awful unit tests that are run on unique JVM instances per test, not even per test class. As defined by the surefire plugin:
<plugin> <artifactId>maven-surefire-plugin</artifactId> <version>2.20.1</version> <executions> <execution> <id>default-test</id> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <forkMode>perTest</forkMode> </configuration> </execution> </executions> <configuration> <forkMode>perTest</forkMode> </configuration> </plugin>
I’ve seen that Gradle supports
forkEvery = 1 to run test classes on unique JVM instances, but I need to go one step further. Manually fixing these tests could take beyond the heat death of the universe, and I’m kinda short on time.
Any thoughts if it’s possible to run the tests on individual JVM instances? I’m not so bothered about the tests taking longer (for now), I plan on coming back to this.