0

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?

Perihelion
  • 33
  • 1
  • 6
  • Is the issue reproduced with IntelliJ IDEA v2020.2.3 (https://www.jetbrains.com/idea/download/)? – Olga Klisho Oct 19 '20 at 15:19
  • @OlgaKlisho yes .. I am running IntelliJ IDEA 2020.2.3 Community Edition & seeing the issue. Also I am running the test using the default JUnit test configuration template & not adding the SplitVerifier vm option – Perihelion Oct 22 '20 at 16:09
  • Please file an issue at YouTrack: https://youtrack.jetbrains.com/issue providing a sample project where the issue is reproduced for you. Thank you – Olga Klisho Oct 26 '20 at 13:40

1 Answers1

0

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.

Jonathan
  • 1
  • 1