Community
Participate
Working Groups
Failure in the I build tests. No markers generated junit.framework.AssertionFailedError: No markers generated at org.eclipse.ui.tests.markers.ResourceMappingMarkersTest.testResourceMappings(ResourceMappingMarkersTest.java:83) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354) at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206) at org.eclipse.test.UITestApplication$3.run(UITestApplication.java:195) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:133) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3378) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3036) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2382) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2346) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2198) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:493) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:488) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.test.UITestApplication.runApplication(UITestApplication.java:138) at org.eclipse.test.UITestApplication.run(UITestApplication.java:60) at org.eclipse.test.UITestApplication.start(UITestApplication.java:210) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193) at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:32) 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:382) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) at org.eclipse.equinox.launcher.Main.run(Main.java:1236) at org.eclipse.equinox.launcher.Main.main(Main.java:1212) at org.eclipse.core.launcher.Main.main(Main.java:30) http://fullmoon.ottawa.ibm.com/downloads/drops/I20080604-2000/testresults/html/org.eclipse.ui.tests_linux.gtk.x86_5.0.html
This looks like a timing issue with the test as it times out if the build takes too long.
We are still seeing this test failure in I builds. Eric and I looked at the test and think that the busy loop is probably not a very good idea, it should be something like Display display = view.getSite().getShell().getDisplay(); while (waiting[0] && System.currentTimeMillis() < timeOut) { while(display.readAndDispatch()) { // consume all events } try { Thread.sleep(100); } catch {InterruptedException ex) { Thread.currentThread().interrupt(); } }
Created attachment 128567 [details] Add a 'sleep(100)' stage to the loop What I did to test this was to lower the timeout until the test failed most of the time (for me it was 105). Then re-ran the tests with the new loop and was successful all the time...
Oleg, could you review the patch please? We want to be sure it's safe before committing it this late...
It seems like it can help. I think the addition of the Thread#sleep() call can help if there are other background processes running when this test is executed.
Committed in >20090312. Applied the patch. We tried this on Paul's linux box with timeout == 100 and it failed the test without the patch but succeeded with it. Re-open this defect should this test ever fail again...
Happened again unfortunately: http://download.eclipse.org/eclipse/downloads/drops/N20090317-2000/testresults/html/org.eclipse.ui.tests_linux.gtk.x86_6.0.html Hitesh, can you have a look at this? This test is too brittle - do you have any idea for making it more stable?
Created attachment 129371 [details] steps to reproduce The attachment show the code to reproduce the problem.
Created attachment 129372 [details] Fix v01 fix.
Eric, could you please take a look at the patch.
Hitest, the patch looks fine...nice solution to use 'join' and let the manager handle figuring out when the job is done... The only nits I have are about formatting...please put spaces around operators and assignments (I know it's hard to change styles your fingers just do what they're used to...;-). Also, the loop construction int i = 0; for (; i < markers.length; i++) { is truly odd and should be for (int i = 0; i < markers.length; i++) {
We'll put this in for RC1, we're done M7.
(In reply to comment #11) > Also, the loop construction > > int i = 0; > for (; i < markers.length; i++) { > > is truly odd and should be > > for (int i = 0; i < markers.length; i++) { Well, i is used later on in an assert, but maybe a while loop (instead of a for loop) would look more regular.
For clarity how about: boolean markerFound = false; for (int i = 0; i < markers.length; i++) { if(markers[i].equals(marker)){ markerFound = true; break; } } assertTrue("No markers generated", markerFound); This way the intent of the test is clearer I think.
Paul, the original patch looks alright but take a look at comment #14. Let me know and I'll spin another patch with the changes if you so desire.
Also, note that this test failed in last night's I-build...but passes on my box (but then it always does).
Looks good. I would like the change to the loop added as well, then it is good. PW
Created attachment 134497 [details] Patch with the test changed Committed in >20090505. Applied this patch.
Marking as fixed, thanks Hitesh!
Hitesh, can you check this with last night's I-build and VERIFY ?
Verified in I20090506-2000 by running the test :)