I upgraded the JVM on my system from JDK 8 to JDK 11 & configured my IntelliJ IDEA (2019.1) to use it. I am able to compile fine, but can no longer run JUnit5 tests from within the IDE.
I created a basic JUnit test:
@ExtendWith(SpringExtension.class)
class UtilsTest {
@BeforeEach
void setUp() {}
@Test
void testA {}
}
When I run this test with IntelliJ pointing to my JDK 8 install, it runs fine. If I run this test with IntelliJ pointing to my JDK 11 install, the test fails to run & I get this error:
Unrecognized VM option 'UseSplitVerifier'
Any suggestions on how to fix this problem?
Intellij passes maven-surefire-plugin and maven-failsafe-plugin parameters to your Junit. I got this trouble too. Even if i uncheck boxes in "Intellij -> File -> Settings -> Running Tests", doesn't work. I removed the .idea folder and all .iml files and reimported the whole project and now, it's working.