Intellij sample test, ERROR: Invalid home path Follow
I was looking at conditionalOperatorConvertor sample [1]. At first, there were some compile errors. I fixed them and run the plugin. But it seemed, it is not working after my fixes. So I tried to run supplied test and got an ERROR: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'. What am I doing wrong?
Please, find full stack trace below. I didn't modify anything in tests. Using Mac with Intellij IC135.480.
[1] https://github.com/JetBrains/intellij-community/tree/master/samples/conditionalOperatorConvertor
------------------------------
ERROR: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
java.lang.RuntimeException: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:76)
at com.intellij.openapi.application.PathManager.getPreInstalledPluginsPath(PathManager.java:132)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:895)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1050)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1179)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:360)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:238)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)
at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:49)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.initApplication(HeavyIdeaTestFixtureImpl.java:176)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setUp(HeavyIdeaTestFixtureImpl.java:101)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$17.run(CodeInsightTestFixtureImpl.java:1101)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
ERROR: null
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2038)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1097)
at testPlugin.YourTest.setUp(YourTest.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.AssertionError: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:56)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1182)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:360)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:238)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)
at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:49)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.initApplication(HeavyIdeaTestFixtureImpl.java:176)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setUp(HeavyIdeaTestFixtureImpl.java:101)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$17.run(CodeInsightTestFixtureImpl.java:1101)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.RuntimeException: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:76)
at com.intellij.openapi.application.PathManager.getPreInstalledPluginsPath(PathManager.java:132)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:895)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1050)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1179)
... 24 more
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.intellij.testFramework.fixtures.impl.JavaCodeInsightTestFixtureImpl$3.run(JavaCodeInsightTestFixtureImpl.java:97)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
ERROR: null
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2038)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.tearDown(CodeInsightTestFixtureImpl.java:1122)
at com.intellij.testFramework.fixtures.impl.JavaCodeInsightTestFixtureImpl.tearDown(JavaCodeInsightTestFixtureImpl.java:102)
at testPlugin.YourTest.tearDown(YourTest.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.AssertionError: setUp() should be called first
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.getProject(HeavyIdeaTestFixtureImpl.java:182)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.getProject(CodeInsightTestFixtureImpl.java:1537)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$18.run(CodeInsightTestFixtureImpl.java:1125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.lang.AssertionError: null
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:56)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2041)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1097)
at testPlugin.YourTest.setUp(YourTest.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2038)
... 29 more
Caused by: java.lang.AssertionError: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:56)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1182)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:360)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:238)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)
at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:49)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.initApplication(HeavyIdeaTestFixtureImpl.java:176)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setUp(HeavyIdeaTestFixtureImpl.java:101)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$17.run(CodeInsightTestFixtureImpl.java:1101)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Caused by: java.lang.RuntimeException: Invalid home path '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'
at com.intellij.openapi.application.PathManager.getHomePath(PathManager.java:76)
at com.intellij.openapi.application.PathManager.getPreInstalledPluginsPath(PathManager.java:132)
at com.intellij.ide.plugins.PluginManagerCore.loadDescriptors(PluginManagerCore.java:895)
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1050)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1179)
... 24 more
java.lang.AssertionError: null
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:56)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2041)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.tearDown(CodeInsightTestFixtureImpl.java:1122)
at com.intellij.testFramework.fixtures.impl.JavaCodeInsightTestFixtureImpl.tearDown(JavaCodeInsightTestFixtureImpl.java:102)
at testPlugin.YourTest.tearDown(YourTest.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2038)
... 29 more
Caused by: java.lang.AssertionError: setUp() should be called first
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.getProject(HeavyIdeaTestFixtureImpl.java:182)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.getProject(CodeInsightTestFixtureImpl.java:1537)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$18.run(CodeInsightTestFixtureImpl.java:1125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
java.lang.AssertionError: null
at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:56)
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:132)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2041)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.tearDown(CodeInsightTestFixtureImpl.java:1122)
at com.intellij.testFramework.fixtures.impl.JavaCodeInsightTestFixtureImpl.tearDown(JavaCodeInsightTestFixtureImpl.java:102)
at testPlugin.YourTest.tearDown(YourTest.java:44)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:74)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:211)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:67)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1272)
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1247)
at javax.swing.SwingUtilities.invokeAndWait(SwingUtilities.java:1347)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2038)
... 29 more
Caused by: java.lang.AssertionError: setUp() should be called first
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.getProject(HeavyIdeaTestFixtureImpl.java:182)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.getProject(CodeInsightTestFixtureImpl.java:1537)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$18.run(CodeInsightTestFixtureImpl.java:1125)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Process finished with exit code 255
Please sign in to leave a comment.
Please check your IntelliJ Platform SDK "sandbox" path, it has illegal path " '/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/test'"
IntelliJ Platform SDK's sandbox home is "/Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox". And it seems to be legal, there are my compiled plugins in ".../plugins-sandbox/plugins" folder. I have no idea why there is additional illegal "text" extension.
so you did escape "<username>" in the logs you posted?
So you're trying to run this test https://github.com/JetBrains/intellij-community/blob/master/samples/conditionalOperatorConvertor/testSource/testPlugin/YourTest.java
Did you change the "dataPath" variable at the top? To what value?
yes, I see my real username instead of <username>
> So you're trying to run this test
exactly
> Did you change the "dataPath" variable at the top?
yes
> To what value?
to legitimate path like "/Users/<username>/workspace/intellij-community/samples/conditionalOperatorConvertor/testData".
But I think test is crashing in setUp() method:
ERROR: null
...
at testPlugin.YourTest.setUp(YourTest.java:38)
So it doesn't start to execute the test itself.
Indeed, reproduced. Unfortunately this sample hasn't been update in quite a while, if you want to learn how to write tests please rather look at actual production code tests.
To make this test work, add "extends UsefulTestCase" to YourTest class definition, then test works for me (but expected result differs from actual result).
Sorry, still not working for me. Have the same error with invalid home path.
I've also needed to modify ConditionalOperatorConvertor for project to compile.
I'm using Intellij IC135.480 on Mac with JDK 1.7.0.51.
Did you try to create "test" folder manually in sandbox-home?
Indeed compilation of ConditionalOperatorConvertor needs to be adjusted.
and what should I put in the test folder?
just empty folder
well, now there is only 1 error :)
java.lang.AssertionError: com.intellij not found; platform prefix is null
at com.intellij.ide.plugins.PluginManagerCore.initializePlugins(PluginManagerCore.java:1105)
at com.intellij.ide.plugins.PluginManagerCore.initPlugins(PluginManagerCore.java:1179)
at com.intellij.openapi.application.impl.ApplicationImpl.loadApplicationComponents(ApplicationImpl.java:360)
at com.intellij.openapi.application.impl.ApplicationImpl.<init>(ApplicationImpl.java:238)
at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:45)
at com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication.java:38)
at com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:35)
at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:49)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.initApplication(HeavyIdeaTestFixtureImpl.java:176)
at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setUp(HeavyIdeaTestFixtureImpl.java:101)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl$17.run(CodeInsightTestFixtureImpl.java:1101)
at com.intellij.util.ui.UIUtil.invokeAndWaitIfNeeded(UIUtil.java:2034)
at com.intellij.testFramework.fixtures.impl.CodeInsightTestFixtureImpl.setUp(CodeInsightTestFixtureImpl.java:1097)
at testPlugin.YourTest.setUp(YourTest.java:37)
at com.intellij.testFramework.UsefulTestCase.defaultRunBare(UsefulTestCase.java:333)
at com.intellij.testFramework.UsefulTestCase$3.run(UsefulTestCase.java:346)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:241)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:733)
at java.awt.EventQueue.access$200(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:694)
at java.awt.EventQueue$3.run(EventQueue.java:692)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:703)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
Process finished with exit code 255
Please attach full test process output as file.
Yann, thank you very much for your support! I make it work.
Short instruction:
1. Modify ConditionalOperatorConvertor.java so it compiles.
2. It is important that getComponentName() returns something other than null.
3. add "extends UsefulTestCase" to public class YourTest
4. create empty "test" folder in /Users/<username>/Library/Caches/IdeaIC13/plugins-sandbox/. later Intellij will add some stuff there.
5. add "-Didea.platform.prefix=Idea" to VM options in test configuration. Kudos to [1].
And test is passing. (There are some log4j:WARN messages).
[1] related thread : http://devnet.jetbrains.com/thread/438714
Thanks for the update, we're working on getting all these samples updated.