Problem with Pitest and Mockito

349 views
Skip to first unread message

Timo Janssen

unread,
May 29, 2021, 3:49:24 AM5/29/21
to PIT Users
Hello,
I'm current using pitest with maven and slo am using junit 5 and Mockito.
I'm getting a weird and annoying message when running pitest.

/ - \ | / - \ | / - \ | / - \ | / - \ | / -stderr  : OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended

Example unit test

@Test
public void test(){
   var list = Mockito.mock(ArrayList.class, Mockito.CALLS_REAL_METHODS);
Assertions.assertNotNull(list);
}

In this case i get the message.
DO I remove the Mockito.CALLS_REAL_METHOS part then I don't get the message.

Do I add the following to my maven configuration then I also don't get any message.
          <jvmArgs>-Xshare:off</jvmArgs>

The message I get for every test method that uses Mockito in the way described before.

Thanks for any help.
Reply all
Reply to author
Forward
0 new messages