Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332188 - [Help] Performance test org.eclipse.ua.tests.testStartServer is failing
Summary: [Help] Performance test org.eclipse.ua.tests.testStartServer is failing
Status: RESOLVED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows All
: P3 normal (vote)
Target Milestone: 3.7 M5   Edit
Assignee: Chris Goldthorpe CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-09 01:18 EST by Satyam Kandula CLA
Modified: 2010-12-09 16:43 EST (History)
1 user (show)

See Also:


Attachments
Patch (727 bytes, patch)
2010-12-09 16:42 EST, Chris Goldthorpe CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Satyam Kandula CLA 2010-12-09 01:18:58 EST
The Performance test org.eclipse.ua.tests.testStartServer is failing for some time. It fails unable to connect to the server. This fails only on windows machine. Here is the call stack that is reported
#######
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:760)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
at org.eclipse.ua.tests.help.util.LoadServletUtil.startServer(LoadServletUtil.java:38)
at org.eclipse.ua.tests.help.performance.HelpServerTest.testStartServer(HelpServerTest.java:76)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:416)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:249)
at org.eclipse.test.UITestApplication$2.run(UITestApplication.java:197)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4059)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3678)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:140)
at org.eclipse.test.UITestApplication.run(UITestApplication.java:62)
at org.eclipse.test.UITestApplication.start(UITestApplication.java:212)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
at org.eclipse.equinox.launcher.Main.main(Main.java:1386)
at org.eclipse.core.launcher.Main.main(Main.java:34)
#####
Comment 1 Chris Goldthorpe CLA 2010-12-09 13:02:29 EST
The test is passing locally. One reason why the test may be failing on the test machine is that it needs to use 127.0.0.1 instead of localhost when creating a URL to read the server and firewalls will sometimes cause localhost to get blocked even though 127.0.0.1 is allowed. This does not affect the quality of the build and can be fixed for 3.7M5.
Comment 2 Chris Goldthorpe CLA 2010-12-09 15:12:01 EST
I can now reproduce the problem and I retract my previous explanation for the failure. The test fails on my PC when using a Sun 6 JRE - it may be a race condition because the test repeatedly stops and starts the server in a loop and the start and stop occur on a different thread to the read from server.
Comment 3 Chris Goldthorpe CLA 2010-12-09 16:42:10 EST
Created attachment 184906 [details]
Patch

The problem was related to stopping the help server and then restarting on the same port instead of letting Jetty pick a port each time. I don't exactly know why this shows up as a problem only on certain JREs but this patch will fix the problem.
Comment 4 Chris Goldthorpe CLA 2010-12-09 16:43:22 EST
Patch applied to HEAD, Fixed.