Bug 295619 - Test failure caused by a timing issue in M20091118-0800
Summary: Test failure caused by a timing issue in M20091118-0800
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 11:53 EST by Olivier Thomann CLA
Modified: 2010-03-08 05:09 EST (History)
2 users (show)

See Also:


Attachments
Patch to reenable the test for HEAD (1.09 KB, patch)
2009-11-19 12:05 EST, Olivier Thomann CLA
no flags Details | Diff
Patch to reenable the test for 3.5 maintenance (1.04 KB, patch)
2009-11-19 12:07 EST, Olivier Thomann CLA
no flags Details | Diff
Patch on HEAD to try to figure out where the problem comes from (2.19 KB, patch)
2009-11-23 08:56 EST, Frederic Fusier CLA
no flags Details | Diff
Proposed patch (1.67 KB, patch)
2010-02-17 10:04 EST, Frederic Fusier CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2009-11-19 11:53:16 EST
Didn't get resource delta after 10 seconds

java.lang.RuntimeException: Didn't get resource delta after 10 seconds
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests$DeltaListener.waitForResourceDelta(AbstractJavaModelTests.java:282)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.assertDeltas(AbstractJavaModelTests.java:947)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.assertDeltas(AbstractJavaModelTests.java:943)
at org.eclipse.jdt.core.tests.model.JavaElementDeltaTests.testChangeExternalLibFolder3(JavaElementDeltaTests.java:911)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.runTest(SuiteOfTestCases.java:100)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.superRun(SuiteOfTestCases.java:84)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$1.protect(SuiteOfTestCases.java:72)
at org.eclipse.jdt.core.tests.model.SuiteOfTestCases$Suite.run(SuiteOfTestCases.java:81)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:354)
at org.eclipse.test.EclipseTestRunner.run(EclipseTestRunner.java:206)
at org.eclipse.test.CoreTestApplication.runTests(CoreTestApplication.java:35)
at org.eclipse.test.CoreTestApplication.run(CoreTestApplication.java:31)
at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
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:368)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
at org.eclipse.equinox.launcher.Main.main(Main.java:1287)
at org.eclipse.core.launcher.Main.main(Main.java:34)
Comment 1 Olivier Thomann CLA 2009-11-19 11:59:57 EST
This is caused by a resource delta not being sent within 10 seconds.
Frédéric, I disabled the test for now.
Please investigate.
Comment 2 Olivier Thomann CLA 2009-11-19 12:05:39 EST
Created attachment 152607 [details]
Patch to reenable the test for HEAD
Comment 3 Olivier Thomann CLA 2009-11-19 12:07:18 EST
Created attachment 152610 [details]
Patch to reenable the test for 3.5 maintenance
Comment 4 Frederic Fusier CLA 2009-11-23 08:56:11 EST
Created attachment 152851 [details]
Patch on HEAD to try to figure out where the problem comes from

If the delta is not got, it's because the corresponding core resource event is not received. This patch re-activate the test trying to determinate whether the problem comes from the underlying OS while touching the file or not... In case not, we could suspect that the problem would come from the Platform/Resource plugin instead.
Comment 5 Olivier Thomann CLA 2009-11-23 15:39:26 EST
We can release that, but I wonder if we should not use assume... instead of assert...
Comment 6 Frederic Fusier CLA 2009-11-24 04:51:21 EST
(In reply to comment #5)
> We can release that, but I wonder if we should not use assume... instead of
> assert...

I do not think so, because, if this test was failing then the calling test would automatically fail. I agree that there still will be a failure but then we could know the real reason and try to think about a real fix for it...
Comment 7 Frederic Fusier CLA 2009-11-24 06:21:39 EST
(In reply to comment #4)
> Created an attachment (id=152851) [details]
> Patch on HEAD to try to figure out where the problem comes from
> 
Released in HEAD stream. I'll wait to have some feedback about this change before changing the state of the bug...
Comment 8 Frederic Fusier CLA 2009-11-25 07:27:55 EST
(In reply to comment #7)
> (In reply to comment #4)
> > Created an attachment (id=152851) [details] [details]
> > Patch on HEAD to try to figure out where the problem comes from
> > 
> Released in HEAD stream. I'll wait to have some feedback about this change
> before changing the state of the bug...
>
I also released corresponding change in the R3_5_maintenance stream for today's maintenance build...
Comment 9 Olivier Thomann CLA 2009-11-25 12:05:06 EST
Released also into JSR_308 branch.
Comment 10 Olivier Thomann CLA 2010-01-05 11:23:05 EST
I think this can be closed as FIXED.
Comment 11 Olivier Thomann CLA 2010-01-07 09:46:50 EST
Closing as FIXED as this didn't fail in subsequent builds.
Comment 12 Frederic Fusier CLA 2010-01-07 11:20:36 EST
It's rather a worksforme as the failure didn't occurred since the code to debug it has been released... We'll see what to do with this issue when it occurs again and that hopefully more information help us to figure out the origin of it...
Comment 13 Olivier Thomann CLA 2010-01-21 10:04:05 EST
Verified for 3.5.2RC2 using M20100120-0800.
Comment 14 Olivier Thomann CLA 2010-01-21 10:06:03 EST
Verified.
Comment 15 Frederic Fusier CLA 2010-02-16 06:13:21 EST
We got another transient failure while running the build input tests today and here was the stack trace:
junit.framework.AssertionFailedError: The file C:\workspaces\externalLib\p\X.class was not touched! expected:<1266316984805> but was:<1266316983805>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:283)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:130)
at org.eclipse.jdt.core.tests.model.AbstractJavaModelTests.touch(AbstractJavaModelTests.java:2827)
at org.eclipse.jdt.core.tests.model.JavaElementDeltaTests.testChangeExternalLibFolder3(JavaElementDeltaTests.java:910)

As guessed, it seems that there's a problem with the underlying OS which does not refresh the last modified time even after having waited 1 second...

I wonder whether we should increase the waiting time or think about another strategy to touch a file...!?
Comment 16 Frederic Fusier CLA 2010-02-17 10:04:43 EST
Created attachment 159315 [details]
Proposed patch

As we know now that the problem comes from the underlying OS, we'll try to loop until the last modified timestamp has really changed. Of course, leave the loop after a 10s timeout...
Comment 17 Frederic Fusier CLA 2010-02-17 10:12:23 EST
(In reply to comment #16)
> Created an attachment (id=159315) [details]
> Proposed patch
> 
Released for 3.6M6 in HEAD stream.
Comment 18 Srikanth Sankaran CLA 2010-03-08 05:09:19 EST
Verified for 3.6M6 by code inspection.