Can't unit test plugin in IDEA 7

I was using the test framework in IDEA 6, setting the idea.plugins.load parameter to false on the JVM.

After i migrated my plugin to IDEA 7 the unit tests stopped working. Even though i set the same parameter i get the following exception:


Caused by: java.lang.AssertionError
+ at com.intellij.ide.plugins.PluginManager.initializePlugins(PluginManager.java:164)+
+ at com.intellij.ide.plugins.PluginManager.getPlugins(PluginManager.java:130)+
+ at com.intellij.openapi.application.impl.ApplicationImpl.e(ApplicationImpl.java:7)+
+ at com.intellij.openapi.application.impl.ApplicationImpl.(ApplicationImpl.java:32)+ + at com.intellij.openapi.application.ex.ApplicationManagerEx.createApplication(ApplicationManagerEx.java:5)+ + at com.intellij.idea.CommandLineApplication.(CommandLineApplication.java:5)+ + at com.intellij.idea.CommandLineApplication.(CommandLineApplication.java:4)+ + at com.intellij.idea.IdeaTestApplication.]]>(IdeaTestApplication.java:8)+
+ at com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.java:2)+
+ at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.initApplication(HeavyIdeaTestFixtureImpl.java:49)+
+ at com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setUp(HeavyIdeaTestFixtureImpl.java:36)+

Any idea what might be wrong ?

6 comments
Comment actions Permalink

do you have anything like -Didea.load.plugins.id=id_of_your_plugin in your run command line?

0
Comment actions Permalink

I don't have that parameter set in my command line.

0
Comment actions Permalink

Hello Hugo,

Use idea.load.plugins=false

I was using the test framework in IDEA 6, setting the
idea.plugins.load parameter to false on the JVM.

After i migrated my plugin to IDEA 7 the unit tests stopped working.
Even though i set the same parameter i get the following exception:

Caused by: java.lang.AssertionError
+ at
com.intellij.ide.plugins.PluginManager.initializePlugins(PluginManager
.java:164)+
+ at
com.intellij.ide.plugins.PluginManager.getPlugins(PluginManager.java:1
30)+
+ at
com.intellij.openapi.application.impl.ApplicationImpl.e(ApplicationImp
l.java:7)+
+ at
com.intellij.openapi.application.impl.ApplicationImpl.<init>(Applicati
onImpl.java:32)+
+ at
com.intellij.openapi.application.ex.ApplicationManagerEx.createApplica
tion(ApplicationManagerEx.java:5)+
+ at
com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication
.java:5)+
+ at
com.intellij.idea.CommandLineApplication.<init>(CommandLineApplication
.java:4)+
+ at
com.intellij.idea.IdeaTestApplication.<init>(IdeaTestApplication.java:
8)+
+ at
com.intellij.idea.IdeaTestApplication.getInstance(IdeaTestApplication.
java:2)+
+ at
com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.init
Application(HeavyIdeaTestFixtureImpl.java:49)+
+ at
com.intellij.testFramework.fixtures.impl.HeavyIdeaTestFixtureImpl.setU
p(HeavyIdeaTestFixtureImpl.java:36)+
Any idea what might be wrong ?

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Now all the plugin are getting initialized.
I'm getting errors like:

java.util.MissingResourceException: Can't find bundle for base name com.siyeh.IntentionPowerPackBundle, locale en_US
at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:1521)
at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1260)
at java.util.ResourceBundle.getBundle(ResourceBundle.java:715)
at com.siyeh.IntentionPowerPackBundle.getBundle(IntentionPowerPackBundle.java:45)
at com.siyeh.IntentionPowerPackBundle.message(IntentionPowerPackBundle.java:38)
at com.siyeh.ipp.IntentionPowerPack.]]>(IntentionPowerPack.java:79)

0
Comment actions Permalink

For the record, my VM parameters are:

-Didea.load.plugins=false -Xbootclasspath/p:/opt/selena/lib/boot.jar -Djdk.home=/usr/lib/jvm/java-6-sun

0
Comment actions Permalink

The idea.plugins.load thing was my mistake, must have copied it wrong when i pasted it into the run configuration.

Anyway, now with idea.load.plugins=false i get a different error, but it seems that IDEA is still trying to load the plugins. Including mine.
I can see that my plugin components are getting initialized, and throwing errors in the process because their not support to get initialized while running unit tests.

So, any idea ?

Thanks.

0

Please sign in to leave a comment.