Difficulty running grails tests in IntelliJ : Illegal use of nonvirtual function call

这一生的挚爱 提交于 2019-12-03 14:18:59

I managed to solve this problem adding the following env variable in my configuration:

   _JAVA_OPTIONS='-Xverify:none'

First check your configurations and clear out the test that you have ran that are now failing. It is possible you ran the tests as JUnit and now when you are running them again them they are defaulting this behavior.

Note: You can determine if this the issue by running your tests via the command line (e.g. grails test-app unit com.yourPackage.Whatever) if they pass as expected then follow the steps below to clear your saved test configurations in IntelliJ

IntelliJ Steps

  1. Click Run
  2. Click Edit Configurations
  3. In the left pane of the pop up click the arrow to unroll the jUnit tests
  4. Next Click on a test and then click the minus icon ( do this for each to clear them all )
  5. Go to your test you want to run and right click it and make sure you select the grails choice and not jUnit.
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!