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

java.net.ConnectException in the middle of the test run (inside waitFor() function, WIN+OS X) #98

Open
zcervink opened this issue Mar 5, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@zcervink
Copy link
Contributor

zcervink commented Mar 5, 2022

  • issue appears on unpredictable places in the middle of the run of a JUnit test

  • issue associated with the waitFor() function from the Remote-Robot framework in which the issue appears

  • issue seen many times on OS X and Windows, never on Linux

  • ROOT CAUSE: it is not clear where exactly the issue appear on deeper level

  • WORKAROUND: rerun the tests

  • error description:

    java.net.ConnectException: Failed to connect to /127.0.0.1:8580
       ...
    Caused by: java.net.ConnectException: Connection refused: connect
       ...
    
@zcervink zcervink added the bug Something isn't working label Mar 5, 2022
@zcervink zcervink self-assigned this Mar 5, 2022
@zcervink zcervink changed the title java.net.ConnectException in the middle of the test run (inside waitFor() function) java.net.ConnectException in the middle of the test run (inside waitFor() function, WIN+OS X) Mar 5, 2022
@zcervink
Copy link
Contributor Author

zcervink commented Mar 7, 2022

Update - one more stacktrace:

java.net.ConnectException: Failed to connect to /127.0.0.1:8580
  	at okhttp3.internal.connection.RealConnection.connectSocket(RealConnection.java:265)
  	at okhttp3.internal.connection.RealConnection.connect(RealConnection.java:183)
  	at okhttp3.internal.connection.ExchangeFinder.findConnection(ExchangeFinder.java:224)
  	at okhttp3.internal.connection.ExchangeFinder.findHealthyConnection(ExchangeFinder.java:108)
  	at okhttp3.internal.connection.ExchangeFinder.find(ExchangeFinder.java:88)
  	at okhttp3.internal.connection.Transmitter.newExchange(Transmitter.java:169)
  	at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:41)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
  	at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
  	at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
  	at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
  	at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
  	at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
  	at okhttp3.RealCall.execute(RealCall.java:81)
  	at retrofit2.OkHttpCall.execute(OkHttpCall.java:204)
  	at com.intellij.remoterobot.client.IdeRobotClient.findAllByXpath(IdeRobotClient.kt:39)
  	at com.intellij.remoterobot.search.Finder.findMany(Finder.kt:43)
  	at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:63)
  	at com.intellij.remoterobot.SearchContext$find$1$2.invoke(SearchContext.kt:53)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:49)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt$waitFor$3.invoke(RepeatUtils.kt:49)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime(RepeatUtils.kt:99)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt.repeatInTime$default(RepeatUtils.kt:87)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor(RepeatUtils.kt:49)
  	at com.intellij.remoterobot.utils.RepeatUtilsKt.waitFor$default(RepeatUtils.kt:36)
  	at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:53)
  	at com.intellij.remoterobot.SearchContext$find$1.invoke(SearchContext.kt:51)
  	at com.intellij.remoterobot.stepsProcessing.StepWorkerKt.step(StepWorker.kt:23)
  	at com.intellij.remoterobot.SearchContext$DefaultImpls.find(SearchContext.kt:51)
  	at com.intellij.remoterobot.RemoteRobot.find(RemoteRobot.kt:32)
  	at org.jboss.tools.intellij.quarkus.tests.BasicTest.minimizeProjectImportPopupIfItAppears(BasicTest.java:169)
  	at org.jboss.tools.intellij.quarkus.tests.BasicTest.createQuarkusProject(BasicTest.java:122)
  	at org.jboss.tools.intellij.quarkus.tests.BasicTest.createBuildQuarkusMavenTest(BasicTest.java:69)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at org.junit.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:515)
  	at org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
  	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:171)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
  	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:167)
  	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:114)
  	at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:59)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:105)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
  	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
  	at java.base/java.util.ArrayList.forEach(ArrayList.java:1541)
  	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:38)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$5(NodeTestTask.java:110)
  	at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:72)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:95)
  	at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:71)
  	at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:32)
  	at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
  	at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:51)
  	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:108)
  	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
  	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
  	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
  	at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
  	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:96)
  	at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:[75](https://github.com/redhat-developer/intellij-quarkus/runs/5446452376?check_suite_focus=true#step:4:75))
  	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.processAllTestClasses(JUnitPlatformTestClassProcessor.java:99)
  	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor$CollectAllTestClassesExecutor.access$000(JUnitPlatformTestClassProcessor.java:[79](https://github.com/redhat-developer/intellij-quarkus/runs/5446452376?check_suite_focus=true#step:4:79))
  	at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestClassProcessor.stop(JUnitPlatformTestClassProcessor.java:75)
  	at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.stop(SuiteTestClassProcessor.java:61)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
  	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
  	at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
  	at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
  	at com.sun.proxy.$Proxy5.stop(Unknown Source)
  	at org.gradle.api.internal.tasks.testing.worker.TestWorker.stop(TestWorker.java:133)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
  	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
  	at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
  	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:1[82](https://github.com/redhat-developer/intellij-quarkus/runs/5446452376?check_suite_focus=true#step:4:82))
  	at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:164)
  	at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:414)
  	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
  	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
  	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:[112](https://github.com/redhat-developer/intellij-quarkus/runs/5446452376?check_suite_focus=true#step:4:112)8)
  	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
  	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
  	at java.base/java.lang.Thread.run(Thread.java:829)
      at org.jboss.tools.intellij.quarkus.tests.BasicTest.createBuildQuarkusMavenTest(BasicTest.java:79)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant