When developing an intellij plugin I have a plugin.xml
file with certain postStartupActivity
entries that slow down and freeze up the tests. If I remove this entry the tests pass immediately. Its not necessary this runs for the tests.. how can I remove this specifically when running tests.
Example plugin.xml
:
<code><idea-plugin url="https://github.com/mycompany/myplugin" require-restart="true" >
<id>com.mycompany.myplugin</id>
<name>My Plugin</name>
<extensions defaultExtensionNs="com.intellij">
<applicationConfigurable
parentId="appearance"
groupWeight="40"
instance="com.mycompany.MyConfigurable"
id="my.id"
displayName="My Plugin"/>
<applicationService serviceImplementation="com.mycompany.MyMainService"/>
<!-- COMMENTING OUT THIS PROBLEM ACTIVITY LETS TEST RUN -->
<!-- HOW DO I prevent this from loading... and/or REPLACE THIS FILE with one that doesnt contain this entry -->
<postStartupActivity implementation="com.mycompany.slowActivity"/>
</extensions>
</idea-plugin>
</code>
<code><idea-plugin url="https://github.com/mycompany/myplugin" require-restart="true" >
<id>com.mycompany.myplugin</id>
<name>My Plugin</name>
<extensions defaultExtensionNs="com.intellij">
<applicationConfigurable
parentId="appearance"
groupWeight="40"
instance="com.mycompany.MyConfigurable"
id="my.id"
displayName="My Plugin"/>
<applicationService serviceImplementation="com.mycompany.MyMainService"/>
<!-- COMMENTING OUT THIS PROBLEM ACTIVITY LETS TEST RUN -->
<!-- HOW DO I prevent this from loading... and/or REPLACE THIS FILE with one that doesnt contain this entry -->
<postStartupActivity implementation="com.mycompany.slowActivity"/>
</extensions>
</idea-plugin>
</code>
<idea-plugin url="https://github.com/mycompany/myplugin" require-restart="true" >
<id>com.mycompany.myplugin</id>
<name>My Plugin</name>
<extensions defaultExtensionNs="com.intellij">
<applicationConfigurable
parentId="appearance"
groupWeight="40"
instance="com.mycompany.MyConfigurable"
id="my.id"
displayName="My Plugin"/>
<applicationService serviceImplementation="com.mycompany.MyMainService"/>
<!-- COMMENTING OUT THIS PROBLEM ACTIVITY LETS TEST RUN -->
<!-- HOW DO I prevent this from loading... and/or REPLACE THIS FILE with one that doesnt contain this entry -->
<postStartupActivity implementation="com.mycompany.slowActivity"/>
</extensions>
</idea-plugin>
example test
<code>// HANGS if i don't comment above postStartupActivity
public class MyTest extends BasePlatformTestCase {
@Test
public void aTest(){
assertEquals(1, 1);
}
}
</code>
<code>// HANGS if i don't comment above postStartupActivity
public class MyTest extends BasePlatformTestCase {
@Test
public void aTest(){
assertEquals(1, 1);
}
}
</code>
// HANGS if i don't comment above postStartupActivity
public class MyTest extends BasePlatformTestCase {
@Test
public void aTest(){
assertEquals(1, 1);
}
}