Running tests from IntelliJ Idea (hg4idea)

I'm working on enhancing hg4idea plugin with ability to create branch. I've tried to run few existing testcases (e.g. HgPushTest) and  - after adding -Didea.platform.prefix=Idea to the VM parameters (is this correct value? - borrowed from common_tests.gant) and - I'm left with this exception:

ERROR: Assertion failed:
java.lang.Throwable
     at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:98)
     at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:105)
     at org.zmlx.hg4idea.execution.HgCommandExecutor.executeInCurrentThread(HgCommandExecutor.java:104)
     at org.zmlx.hg4idea.command.HgAddCommand.addFiles(HgAddCommand.java:87)
     at org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:74)
     at org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:46)
     at org.zmlx.hg4idea.HgVFSListener$1.run(HgVFSListener.java:116)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:424)
     at com.intellij.openapi.progress.Task.queue(Task.java:67)
     at org.zmlx.hg4idea.HgVFSListener.performAdding(HgVFSListener.java:92)
     at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:130)
     at org.zmlx.hg4idea.HgVFSListener.executeAdd(HgVFSListener.java:86)
     at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:100)
     at com.intellij.openapi.vcs.VcsVFSListener$MyCommandAdapter.commandFinished(VcsVFSListener.java:392)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.fireCommandFinished(CommandProcessorImpl.java:208)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:173)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:121)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
     at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:118)
     at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:34)
     at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:73)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
     at java.awt.EventQueue.access$000(EventQueue.java:85)
     at java.awt.EventQueue$1.run(EventQueue.java:603)
     at java.awt.EventQueue$1.run(EventQueue.java:601)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
     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)
java.lang.AssertionError: Assertion failed:
     at com.intellij.testFramework.LoggedErrorProcessor$1.processError(LoggedErrorProcessor.java:35)
     at com.intellij.testFramework.TestLogger.error(TestLogger.java:52)
     at com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
     at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:98)
     at com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:105)
     at org.zmlx.hg4idea.execution.HgCommandExecutor.executeInCurrentThread(HgCommandExecutor.java:104)
     at org.zmlx.hg4idea.command.HgAddCommand.addFiles(HgAddCommand.java:87)
     at org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:74)
     at org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:46)
     at org.zmlx.hg4idea.HgVFSListener$1.run(HgVFSListener.java:116)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:464)
     at com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressManagerImpl.java:424)
     at com.intellij.openapi.progress.Task.queue(Task.java:67)
     at org.zmlx.hg4idea.HgVFSListener.performAdding(HgVFSListener.java:92)
     at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:130)
     at org.zmlx.hg4idea.HgVFSListener.executeAdd(HgVFSListener.java:86)
     at com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java:100)
     at com.intellij.openapi.vcs.VcsVFSListener$MyCommandAdapter.commandFinished(VcsVFSListener.java:392)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.fireCommandFinished(CommandProcessorImpl.java:208)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(CommandProcessorImpl.java:173)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:121)
     at com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(CommandProcessorImpl.java:91)
     at com.intellij.openapi.command.WriteCommandAction.performWriteCommandAction(WriteCommandAction.java:118)
     at com.intellij.openapi.command.WriteCommandAction.access$000(WriteCommandAction.java:34)
     at com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandAction.java:73)
     at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
     at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
     at java.awt.EventQueue.access$000(EventQueue.java:85)
     at java.awt.EventQueue$1.run(EventQueue.java:603)
     at java.awt.EventQueue$1.run(EventQueue.java:601)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
     at java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
     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)


The reason of above exception is this line in HgCommandExecutor#executeInCurrentThread():
LOG.assertTrue(!ApplicationManager.getApplication().isDispatchThread());



Any hint what is missing from tests run configuration?

1 comment
Comment actions Permalink

Hello Marcin,

This is not a problem with the way you run tests, this is an actual test
failure in the hg4idea plugin. It fails the same way for us here.

I'm working on enhancing hg4idea plugin with ability to create branch.
I've tried to run few existing testcases (e.g. HgPushTest) and  -
after adding -Didea.platform.prefix=Idea to the VM parameters (is this
correct value? - borrowed from common_tests.gant) and - I'm left with
this exception:

 
> java.lang.Throwable
> 
>      at
> com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:98)
> 
>      at
> com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:105)
> 
>      at
> org.zmlx.hg4idea.execution.HgCommandExecutor.executeInCurrentThread(Hg
> CommandExecutor.java:104)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.addFiles(HgAddCommand.java:87)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:74)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:46)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener$1.run(HgVFSListener.java:116)
> 
>      at
> com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.ru
> n(ProgressManagerImpl.java:464)
> 
>      at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressMan
> agerImpl.java:424)
> 
>      at
> com.intellij.openapi.progress.Task.queue(Task.java:67)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener.performAdding(HgVFSListener.java:92)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java
> :130)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener.executeAdd(HgVFSListener.java:86)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java
> :100)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener$MyCommandAdapter.commandFinish
> ed(VcsVFSListener.java:392)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.fireCommandFini
> shed(CommandProcessorImpl.java:208)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(C
> ommandProcessorImpl.java:173)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(
> CommandProcessorImpl.java:121)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(
> CommandProcessorImpl.java:91)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction.performWriteCommandAct
> ion(WriteCommandAction.java:118)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction.access$000(WriteComman
> dAction.java:34)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandActi
> on.java:73)
> 
>      at
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
> 
>      at
> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
> 
>      at
> java.awt.EventQueue.access$000(EventQueue.java:85)
> 
>      at
> java.awt.EventQueue$1.run(EventQueue.java:603)
> 
>      at
> java.awt.EventQueue$1.run(EventQueue.java:601)
> 
>      at
> java.security.AccessController.doPrivileged(Native Method)
> 
>      at
> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCon
> trolContext.java:87)
> 
>      at
> java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
> 
>      at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
> d.java:269)
> 
>      at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
> ava:184)
> 
>      at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
> d.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)
> 
> java.lang.AssertionError: Assertion failed:
> 
>      at
> com.intellij.testFramework.LoggedErrorProcessor$1.processError(LoggedE
> rrorProcessor.java:35)
> 
>      at
> com.intellij.testFramework.TestLogger.error(TestLogger.java:52)
> 
>      at
> com.intellij.openapi.diagnostic.Logger.error(Logger.java:65)
> 
>      at
> com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:98)
> 
>      at
> com.intellij.openapi.diagnostic.Logger.assertTrue(Logger.java:105)
> 
>      at
> org.zmlx.hg4idea.execution.HgCommandExecutor.executeInCurrentThread(Hg
> CommandExecutor.java:104)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.addFiles(HgAddCommand.java:87)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:74)
> 
>      at
> org.zmlx.hg4idea.command.HgAddCommand.execute(HgAddCommand.java:46)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener$1.run(HgVFSListener.java:116)
> 
>      at
> com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.ru
> n(ProgressManagerImpl.java:464)
> 
>      at
> com.intellij.openapi.progress.impl.ProgressManagerImpl.run(ProgressMan
> agerImpl.java:424)
> 
>      at
> com.intellij.openapi.progress.Task.queue(Task.java:67)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener.performAdding(HgVFSListener.java:92)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java
> :130)
> 
>      at
> org.zmlx.hg4idea.HgVFSListener.executeAdd(HgVFSListener.java:86)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener.executeAdd(VcsVFSListener.java
> :100)
> 
>      at
> com.intellij.openapi.vcs.VcsVFSListener$MyCommandAdapter.commandFinish
> ed(VcsVFSListener.java:392)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.fireCommandFini
> shed(CommandProcessorImpl.java:208)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.finishCommand(C
> ommandProcessorImpl.java:173)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(
> CommandProcessorImpl.java:121)
> 
>      at
> com.intellij.openapi.command.impl.CommandProcessorImpl.executeCommand(
> CommandProcessorImpl.java:91)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction.performWriteCommandAct
> ion(WriteCommandAction.java:118)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction.access$000(WriteComman
> dAction.java:34)
> 
>      at
> com.intellij.openapi.command.WriteCommandAction$1.run(WriteCommandActi
> on.java:73)
> 
>      at
> java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
> 
>      at
> java.awt.EventQueue.dispatchEventImpl(EventQueue.java:642)
> 
>      at
> java.awt.EventQueue.access$000(EventQueue.java:85)
> 
>      at
> java.awt.EventQueue$1.run(EventQueue.java:603)
> 
>      at
> java.awt.EventQueue$1.run(EventQueue.java:601)
> 
>      at
> java.security.AccessController.doPrivileged(Native Method)
> 
>      at
> java.security.AccessControlContext$1.doIntersectionPrivilege(AccessCon
> trolContext.java:87)
> 
>      at
> java.awt.EventQueue.dispatchEvent(EventQueue.java:612)
> 
>      at
> java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThrea
> d.java:269)
> 
>      at
> java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.j
> ava:184)
> 
>      at
> java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThrea
> d.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)]]>


The reason of above exception is this line in
HgCommandExecutor#executeInCurrentThread():

 DispatchThread());
> 
> ]]>


Any hint what is missing in tests run configuration?

---
Original message URL:
http://devnet.jetbrains.net/message/5306790#5306790


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


0

Please sign in to leave a comment.