Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error message in IntelliJ Plugin Console with Java Multi module and Infinitest Filter #417

Open
herveDarritchon opened this issue Oct 10, 2023 · 1 comment

Comments

@herveDarritchon
Copy link

herveDarritchon commented Oct 10, 2023

Context

  • Plugin: [Infinitest for IntelliJ]
  • Plugin Version: [5.4.3]
  • IDE: [IntelliJ 2018.1.0]

Describe the bug
Error in the IDE Console during test Running with timeout message

java.lang.RuntimeException: Cannot invoke (class=FilterFileWatcher, method=after, topic=BulkFileListener)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:676)
	at com.intellij.util.messages.impl.MessageBusImplKt.executeOrAddToQueue(MessageBusImpl.kt:491)
	at com.intellij.util.messages.impl.ToDirectChildrenMessagePublisher.publish$intellij_platform_core(CompositeMessageBus.kt:310)
	at com.intellij.util.messages.impl.MessagePublisher.invoke(MessageBusImpl.kt:448)
	at jdk.proxy2/jdk.proxy2.$Proxy217.after(Unknown Source)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.lambda$fireAfterEvents$19(PersistentFSImpl.java:1326)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.runSuppressing(PersistentFSImpl.java:955)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.fireAfterEvents(PersistentFSImpl.java:1323)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.lambda$processEvent$7(PersistentFSImpl.java:921)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.runSuppressing(PersistentFSImpl.java:955)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.processEvent(PersistentFSImpl.java:918)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.deleteFile(PersistentFSImpl.java:618)
	at com.intellij.openapi.vfs.newvfs.impl.VirtualFileSystemEntry.delete(VirtualFileSystemEntry.java:306)
	at com.intellij.psi.impl.file.PsiFileImplUtil.doDelete(PsiFileImplUtil.java:68)
	at com.intellij.psi.impl.source.PsiFileImpl.delete(PsiFileImpl.java:448)
	at com.intellij.ide.util.DeleteHandler.lambda$doDeleteFiles$5(DeleteHandler.java:333)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteAction(ApplicationImpl.java:992)
	at com.intellij.ide.util.DeleteHandler.doDeleteFiles(DeleteHandler.java:330)
	at com.intellij.ide.util.DeleteHandler.lambda$deleteInCommand$0(DeleteHandler.java:223)
	at com.intellij.openapi.fileEditor.impl.NonProjectFileWritingAccessProvider.disableChecksDuring(NonProjectFileWritingAccessProvider.java:170)
	at com.intellij.ide.util.DeleteHandler.lambda$deleteInCommand$1(DeleteHandler.java:210)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:219)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:174)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:164)
	at com.intellij.openapi.command.impl.CoreCommandProcessor.executeCommand(CoreCommandProcessor.java:150)
	at com.intellij.ide.util.DeleteHandler.deleteInCommand(DeleteHandler.java:210)
	at com.intellij.ide.util.DeleteHandler.deletePsiElement(DeleteHandler.java:195)
	at com.intellij.ide.util.DeleteHandler.deletePsiElement(DeleteHandler.java:122)
	at com.intellij.ide.projectView.impl.ProjectViewDeleteElementProvider.deleteElement(ProjectViewDeleteElementProvider.java:58)
	at com.intellij.ide.actions.DeleteAction.actionPerformed(DeleteAction.java:33)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.java:339)
	at com.intellij.openapi.keymap.impl.ActionProcessor.performAction(ActionProcessor.java:47)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher$myActionProcessor$1.performAction(IdeKeyEventDispatcher.kt:502)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5$lambda$4(IdeKeyEventDispatcher.kt:865)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:105)
	at com.intellij.openapi.application.TransactionGuardImpl.performUserActivity(TransactionGuardImpl.java:94)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner$lambda$5(IdeKeyEventDispatcher.kt:865)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.java:362)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.doPerformActionInner(IdeKeyEventDispatcher.kt:863)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcherKt.access$doPerformActionInner(IdeKeyEventDispatcher.kt:1)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction$intellij_platform_ide_impl(IdeKeyEventDispatcher.kt:587)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processAction(IdeKeyEventDispatcher.kt:513)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.processActionOrWaitSecondStroke(IdeKeyEventDispatcher.kt:454)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.inInitState(IdeKeyEventDispatcher.kt:447)
	at com.intellij.openapi.keymap.impl.IdeKeyEventDispatcher.dispatchKeyEvent(IdeKeyEventDispatcher.kt:309)
	at com.intellij.ide.IdeEventQueue.dispatchKeyEvent(IdeEventQueue.kt:617)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:587)
	at com.intellij.ide.IdeEventQueue.access$_dispatchEvent(IdeEventQueue.kt:67)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:369)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1$1.compute(IdeEventQueue.kt:368)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:787)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:368)
	at com.intellij.ide.IdeEventQueue$dispatchEvent$processEventRunnable$1$1.invoke(IdeEventQueue.kt:363)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$1(IdeEventQueue.kt:992)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:113)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:992)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$7(IdeEventQueue.kt:363)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:861)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:405)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Caused by: java.lang.RuntimeException: java.net.SocketTimeoutException: Accept timed out
	at org.infinitest.testrunner.process.TcpSocketProcessCommunicator.openSocket(TcpSocketProcessCommunicator.java:81)
	at org.infinitest.testrunner.process.NativeConnectionFactory.getConnection(NativeConnectionFactory.java:63)
	at org.infinitest.testrunner.TestQueueProcessor.establishConnection(TestQueueProcessor.java:66)
	at org.infinitest.testrunner.TestQueueProcessor.<init>(TestQueueProcessor.java:49)
	at org.infinitest.testrunner.MultiProcessRunner$1.createQueueProcessor(MultiProcessRunner.java:55)
	at org.infinitest.testrunner.queue.QueueConsumer.startProcessing(QueueConsumer.java:67)
	at org.infinitest.testrunner.queue.QueueConsumer.push(QueueConsumer.java:62)
	at org.infinitest.testrunner.MultiProcessRunner.runTests(MultiProcessRunner.java:69)
	at org.infinitest.DefaultInfinitestCore.runTests(DefaultInfinitestCore.java:275)
	at org.infinitest.DefaultInfinitestCore.runOptimizedTestSet(DefaultInfinitestCore.java:157)
	at org.infinitest.DefaultInfinitestCore.update(DefaultInfinitestCore.java:119)
	at org.infinitest.DefaultInfinitestCore.filterFileWasUpdated(DefaultInfinitestCore.java:245)
	at org.infinitest.intellij.idea.FilterFileWatcher.runEnabledTests(FilterFileWatcher.java:90)
	at org.infinitest.intellij.idea.FilterFileWatcher.after(FilterFileWatcher.java:75)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeMethod(MessageBusImpl.kt:699)
	at com.intellij.util.messages.impl.MessageBusImplKt.invokeListener(MessageBusImpl.kt:659)
	... 64 more
Caused by: java.net.SocketTimeoutException: Accept timed out
	at java.base/sun.nio.ch.NioSocketImpl.timedAccept(NioSocketImpl.java:713)
	at java.base/sun.nio.ch.NioSocketImpl.accept(NioSocketImpl.java:757)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:675)
	at java.base/java.net.ServerSocket.platformImplAccept(ServerSocket.java:641)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:617)
	at java.base/java.net.ServerSocket.implAccept(ServerSocket.java:574)
	at java.base/java.net.ServerSocket.accept(ServerSocket.java:532)
	at org.infinitest.testrunner.process.TcpSocketProcessCommunicator.openSocket(TcpSocketProcessCommunicator.java:75)
	... 79 more

To Reproduce

When dealing with an issue dependent on the project being tests link to a github repo that allows to reproduce.

Steps to reproduce the behavior:

  • Nothing really simple to reproduce, it is an Entreprise Java multi module with lots of code. Based on Spring Boot.
  • Some of the modules are disabled in the intellij infintest window to limit the scope and the time to run all the tests.
  • I modify a test code and then infinitest try to run the test (it shouldn't).
  • I have a infinitest filter file :
    excludeGroups IntegrationTest

My Test prototype, inside I have put an error to see if it is triggered by infinitest.

@RunWith(SpringRunner.class)
@Tag("IntegrationTest")
@WebMvcTest(controllers = {ApplicationResource.class})
@ContextConfiguration(classes = {MockMvcSupport.class, JwtTokenProvider.class, WebSecurityTestConfig.class, ApplicationResource.class})
@ActiveProfiles(profiles = "test")
public class ApplicationResourceTest {

Expected behavior
The test class not being run and it is run !

@gtoison
Copy link
Contributor

gtoison commented Oct 10, 2023

Thank you for reporting the issue
Infinitest run the tests from a separate JVM process. The IDE connects to it, to get request the execution of tests and get the results. The error you have sent shows that the IDE failed to connect to that process, so my guess is that it failed to start.
Could you please have a look at the "Console" tab of the Infinitest view (there should be 3 tabs: Results, Logging & Console) and let me know if you see something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants