| Summary: | GetContentUsingRemoteHelp randomly fails on JRE 7 due to wrong test order | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Dani Megert <daniel_megert> | ||||||
| Component: | User Assistance | Assignee: | Dani Megert <daniel_megert> | ||||||
| Status: | VERIFIED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | cgold, daniel_megert, kim.moir | ||||||
| Version: | 3.8 | ||||||||
| Target Milestone: | 3.8 M6 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows 7 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 210372 [details]
Fix
Patched released and merged into integration (In reply to comment #2) > Patched released and merged into integration Thanks Kim! Chris, I'd still be interested in learning the details of this test class. I've taken a look at the test and don't understand why the order of tests is important. I haven't run the test in a debugger. These tests are testing remote help by connecting to a mock server to get the content that a remote server would provide. The request to the mock server goes through MockContentServlet which returns an html page which includes the port number of the server. The port number is included in the response so that in the case where there are two mock remote servers we can verify that we are reading content from the right server. The test will start the mock servers if they are not already running but does not attempt to shut them down. If the test fails by returning the wrong port number it suggests that the remote content in the single sever test is coming from the second server, but I don't exactly understand why since the single server test sets the preferences to only look for the first server. Thanks for the explanation Chris. I now understand why the order is important: there is a test (setTwoMockRemoteServersReversePriority) that inverts the ports. If that one is executed before the "normal/single" server tests, then they fail due to the switched ports. Do you agree with that conclusion? That seems like a plausible explanation, I would have to debug the test case to know for sure. (In reply to comment #2) > Patched released and merged into integration Kim, did you forget to push your changes? The fix is not in the shared repository (HEAD is 8 days old): http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=HEAD Created attachment 210490 [details]
Fix without noise
Sorry, not sure what happened there. I've released your new patch and pushed to the remote master and integration branches. Verified in N20120203-2000. . |
N20120131-2000. GetContentUsingRemoteHelp randomly fails on JRE 7 due to wrong test order. The reason seems to be the remote ordering tests which start a second test server. If that happens before the testContentFound test, then the port is wrong. Attached is a patch that ensures a fixed order for the tests. However, I think it would be better to correctly start and stop the servers on startUp() and tearDown(). I tried to add TestServerManager.stop("ua.test", 0); TestServerManager.stop("ua.test2", 1); but this didn't work. Chris, can you shed some lights on how those test servers are started/stopped and why the port is wrong when the ordering is not OK?