Scala Test broken for all tests in project

As of         0.6.155 & 0.5.963 we cannot run our scala tests any more.

We have tagged our tests with UnitTestTag extends Tag("UnitTestTag") etc

When we want to run all unit tests we use a scala test runner with 'In Whole Project' and test options of -n "UnitTestTag".

This now just gives the error below.

2012-09-07 12:29:51,654 [2490059]  ERROR - com.intellij.ide.IdeEventQueue - Error during dispatching of java.awt.event.MouseEvent[MOUSE_RELEASED,(470,74),absolute(462,66),button=1,modifiers=Button1,clickCount=1] on frame0
com.intellij.psi.impl.PsiJavaParserFacadeImpl$14: Incorrect method "private package() {}".
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.a(PsiJavaParserFacadeImpl.java:407)
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:219)
 at com.intellij.psi.impl.PsiElementFactoryImpl.createMethodFromText(PsiElementFactoryImpl.java:701)
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:228)
 at org.jetbrains.plugins.scala.lang.psi.light.EmptyPrivateConstructor.<init>(EmptyPrivateConstructor.scala:13)
 at org.jetbrains.plugins.scala.lang.psi.light.PsiClassWrapper.getEmptyConstructor(PsiClassWrapper.scala:171)
 at org.jetbrains.plugins.scala.lang.psi.light.PsiClassWrapper.getConstructors(PsiClassWrapper.scala:178)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration$$anonfun$getState$1.apply(AbstractTestRunConfiguration.scala:327)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration$$anonfun$getState$1.apply(AbstractTestRunConfiguration.scala:325)
 at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:58)
 at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration.getState(AbstractTestRunConfiguration.scala:325)
 at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:204)
 at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:73)
 at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:62)
 at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:98)
 at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:109)
 at com.intellij.execution.impl.ExecutionManagerImpl.restartRunProfile(ExecutionManagerImpl.java:303)
 at com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerformed(ExecutorRegistryImpl.java:256)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:169)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:132)
 at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:310)
 at java.awt.Component.processEvent(Component.java:6055)
 at java.awt.Container.processEvent(Container.java:2039)
 at java.awt.Component.dispatchEventImpl(Component.java:4653)
 at java.awt.Container.dispatchEventImpl(Container.java:2097)
 at java.awt.Component.dispatchEvent(Component.java:4481)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
 at java.awt.Container.dispatchEventImpl(Container.java:2083)
 at java.awt.Window.dispatchEventImpl(Window.java:2482)
 at java.awt.Component.dispatchEvent(Component.java:4481)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
 at java.awt.EventQueue.access$000(EventQueue.java:84)
 at java.awt.EventQueue$1.run(EventQueue.java:607)
 at java.awt.EventQueue$1.run(EventQueue.java:605)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
 at java.awt.EventQueue$2.run(EventQueue.java:621)
 at java.awt.EventQueue$2.run(EventQueue.java:619)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
 at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:672)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:493)
 at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:375)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.AssertionError: Unexpected tokens
 at com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:217)
 at com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:270)
 at com.intellij.psi.impl.source.tree.LazyParseableElement.e(LazyParseableElement.java:164)
 at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:208)
 at com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:217)
 ... 53 more
2012-09-07 12:29:51,655 [2490060]  ERROR - com.intellij.ide.IdeEventQueue - IntelliJ IDEA (Leda) IU-122.264  Build #IU-122.264
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - JDK: 1.6.0_30
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - VM: Java HotSpot(TM) Client VM
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - Vendor: Sun Microsystems Inc.
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - OS: Windows 7
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - Last Action: Run
2012-09-07 12:29:51,656 [2490061]  ERROR - com.intellij.ide.IdeEventQueue - Original exception:  
java.lang.AssertionError: Unexpected tokens
 at com.intellij.lang.java.parser.JavaParserUtil.parseFragment(JavaParserUtil.java:217)
 at com.intellij.psi.impl.source.tree.JavaElementType$JavaDummyElementType.parseContents(JavaElementType.java:270)
 at com.intellij.psi.impl.source.tree.LazyParseableElement.e(LazyParseableElement.java:164)
 at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:208)
 at com.intellij.psi.impl.source.JavaDummyElement.getFirstChildNode(JavaDummyElement.java:69)
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:217)
 at com.intellij.psi.impl.PsiElementFactoryImpl.createMethodFromText(PsiElementFactoryImpl.java:701)
 at com.intellij.psi.impl.PsiJavaParserFacadeImpl.createMethodFromText(PsiJavaParserFacadeImpl.java:228)
 at org.jetbrains.plugins.scala.lang.psi.light.EmptyPrivateConstructor.<init>(EmptyPrivateConstructor.scala:13)
 at org.jetbrains.plugins.scala.lang.psi.light.PsiClassWrapper.getEmptyConstructor(PsiClassWrapper.scala:171)
 at org.jetbrains.plugins.scala.lang.psi.light.PsiClassWrapper.getConstructors(PsiClassWrapper.scala:178)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration$$anonfun$getState$1.apply(AbstractTestRunConfiguration.scala:327)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration$$anonfun$getState$1.apply(AbstractTestRunConfiguration.scala:325)
 at scala.collection.mutable.ResizableArray$class.foreach(ResizableArray.scala:58)
 at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:47)
 at org.jetbrains.plugins.scala.testingSupport.test.AbstractTestRunConfiguration.getState(AbstractTestRunConfiguration.scala:325)
 at com.intellij.execution.runners.ExecutionEnvironment.getState(ExecutionEnvironment.java:204)
 at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:73)
 at com.intellij.execution.runners.GenericProgramRunner.execute(GenericProgramRunner.java:62)
 at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:98)
 at com.intellij.execution.ProgramRunnerUtil.executeConfiguration(ProgramRunnerUtil.java:109)
 at com.intellij.execution.impl.ExecutionManagerImpl.restartRunProfile(ExecutionManagerImpl.java:303)
 at com.intellij.execution.ExecutorRegistryImpl$ExecutorAction.actionPerformed(ExecutorRegistryImpl.java:256)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:169)
 at com.intellij.openapi.actionSystem.impl.ActionButton.a(ActionButton.java:132)
 at com.intellij.openapi.actionSystem.impl.ActionButton.processMouseEvent(ActionButton.java:310)
 at java.awt.Component.processEvent(Component.java:6055)
 at java.awt.Container.processEvent(Container.java:2039)
 at java.awt.Component.dispatchEventImpl(Component.java:4653)
 at java.awt.Container.dispatchEventImpl(Container.java:2097)
 at java.awt.Component.dispatchEvent(Component.java:4481)
 at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4575)
 at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4236)
 at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4166)
 at java.awt.Container.dispatchEventImpl(Container.java:2083)
 at java.awt.Window.dispatchEventImpl(Window.java:2482)
 at java.awt.Component.dispatchEvent(Component.java:4481)
 at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:648)
 at java.awt.EventQueue.access$000(EventQueue.java:84)
 at java.awt.EventQueue$1.run(EventQueue.java:607)
 at java.awt.EventQueue$1.run(EventQueue.java:605)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
 at java.awt.EventQueue$2.run(EventQueue.java:621)
 at java.awt.EventQueue$2.run(EventQueue.java:619)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
 at java.awt.EventQueue.dispatchEvent(EventQueue.java:618)
 at com.intellij.ide.IdeEventQueue.e(IdeEventQueue.java:672)
 at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:493)
 at com.intellij.ide.IdeEventQueue.b(IdeEventQueue.java:375)
 at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:333)
 at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
 at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
 at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
 at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
 at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

5 comments
Comment actions Permalink

I saw this exception. I'll fix it ASAP and upload new plugin version.
However as workaround you can try to use different "package object" syntax (`package` syntax currently is giving this problem) in case if you have such package objects in your sources.

Best regards.
Alexander Podkhalyuzin.

0
Comment actions Permalink

Great, thanks for looking at it quickly.

0
Comment actions Permalink

Appears to be broken again in 0.5.977

Appears to be a classpath length issue. Use a file for the classpath fixes it.

0
Comment actions Permalink

Yes, quite broken for me as well.

"Error running Run All Tests:
Not found suite class."

I switched from SpecTest to FlatSpec and still the same.

I also found a lot of trouble with resolving dependencies when I used package objects, so I've removed all of them. I've invalidated all caches adn restarted a half dozen times during each of these changes. The resolving is better, but the tests still don't run (same error as above).

Otherwise, keep up the great work with the plugin -- I love it and your work is much appreciated. :)

0
Comment actions Permalink

Okay, seems like it was my fault.
I installed the Maven scala plugin and it gave me a little clearer explanation of what was actually wrong. I had an import covering up a definition. After fixing that, the IDEA scala plugin could tell that I had made a typo in my directory when doing a recent refactoring. After changing that, the scala plugin can find the tests just fine.

0

Please sign in to leave a comment.