Exception running tests under 13 EAP

Hi all,

I've just compiled my plugin under the 13 EAP, and apart from some very minor API changes it seems to work ok. However when I run my tests I get the following exception:

java.lang.AssertionError: Project (Disposed) light_temp_1413131302026523949
    at com.intellij.openapi.project.impl.ProjectManagerImpl.getOpenProjects(ProjectManagerImpl.java:382)
    at com.intellij.testFramework.LightPlatformTestCase.doSetup(LightPlatformTestCase.java:414)
    at com.intellij.testFramework.LightPlatformTestCase.setUp(LightPlatformTestCase.java:328)
    at org.jetbrains.plugins.clojure.ClojureLightPlatformCodeInsightTestCase.setUp(ClojureLightPlatformCodeInsightTestCase.java:48)
    at com.intellij.testFramework.LightPlatformTestCase.startRunAndTear(LightPlatformTestCase.java:675)
    at com.intellij.testFramework.LightPlatformTestCase.access$700(LightPlatformTestCase.java:113)
    at com.intellij.testFramework.LightPlatformTestCase$8.run(LightPlatformTestCase.java:641)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)

<snip>

Has anything changed about the project lifecycle in 13 that might cause this? These tests work fine under 12.

Thanks,
Colin

4 comments

Could it be that a previous test doesn't call fixture tearDown?

0

I don't think so, since this happens on the first test. This is in the Clojure plugin, BTW. What seems to happen is that the test cases are FileSetTestCases, they call super.setUp() and then fixture.setUp() on an IdeaProjectTestFixture. I'm guessing that super.setUp() creates a test project somewhere? Anyway, during setup the test cases call ProjectManagerImpl.getOpenProjects() which in 13 in the isUnitTestMode section validates that the projects are not disposed. By the time the actual test is called there are two test projects, one of which is disposed - this is true in both 12 and 13.

So the question is, are the tests badly structured, or is this a new bug?

0

LexerTest was badly structured and assertions to detect such flaws were added in IDEA 13. I've rewritten the test.

0

Please sign in to leave a comment.