Eclipse UI在运行TestNG测试时冻结了57%

时间:2014-10-01 22:38:54

标签: eclipse testng socket-timeout-exception

当我尝试运行TestNG测试用例时,我注意到Eclipse UI被卡在了57%。我juts在Library(Build path)中设置了TestNG,并且没有Jars存在。我该如何解决?我现在坐了几个小时。

java.net.SocketTimeoutException: Accept timed out
    at java.net.DualStackPlainSocketImpl.waitForNewConnection(Native Method)
    at java.net.DualStackPlainSocketImpl.socketAccept(Unknown Source)
    at java.net.AbstractPlainSocketImpl.accept(Unknown Source)
    at java.net.PlainSocketImpl.accept(Unknown Source)
    at java.net.ServerSocket.implAccept(Unknown Source)
    at java.net.ServerSocket.accept(Unknown Source)
    at org.testng.remote.strprotocol.BaseMessageSender.initReceiver(BaseMessageSender.java:128)
    at org.testng.eclipse.ui.TestRunnerViewPart.startTestRunListening(TestRunnerViewPart.java:362)
    at org.testng.eclipse.TestNGPlugin.connectTestRunner(TestNGPlugin.java:213)
    at org.testng.eclipse.TestNGPlugin$2.run(TestNGPlugin.java:201)
    at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
    at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:136)
    at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4147)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3764)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:135)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

3 个答案:

答案 0 :(得分:0)

这是known issue。我也是在过去经历过的。不幸的是我不知道为我修复了什么。所有我知道在基于Eclipse 4的STS版本中我不会发生这种情况。但是我也从头开始创建工作区。

答案 1 :(得分:0)

杀死Eclipse,重新启动它,清除所有断点,然后重置所需的断点。这在Eclipse Luna v4.4.1中适用于我。

请参阅https://github.com/cbeust/testng-eclipse/issues/55

同样仔细检查类路径中的TestNG库。我有一个Maven项目,其中一些旧的解决并放入类路径。我在Pom.xml的依赖项部分中将TestNG依赖项更高,并且在删除断点时修复它没有帮助。

答案 2 :(得分:0)

创建一个新工作区并导入项目。您的旧工作区已损坏。