Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 159315 Details for
Bug 295619
Test failure caused by a timing issue in M20091118-0800
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed patch
v02.txt (text/plain), 1.67 KB, created by
Frederic Fusier
on 2010-02-17 10:04:43 EST
(
hide
)
Description:
Proposed patch
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2010-02-17 10:04:43 EST
Size:
1.67 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java,v >retrieving revision 1.236 >diff -u -r1.236 AbstractJavaModelTests.java >--- src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java 24 Nov 2009 10:57:06 -0000 1.236 >+++ src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java 17 Feb 2010 15:04:31 -0000 >@@ -2818,13 +2818,23 @@ > return result; > } > protected void touch(File f) { >- int time = 1000; >+ final int time = 1000; > long lastModified = f.lastModified(); > f.setLastModified(lastModified + time); > org.eclipse.jdt.core.tests.util.Util.waitAtLeast(time); >- // Assertion to track the reason of unexpected failures with tests on external resources >+ // Loop until the last modified time has really changed on the file > // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=295619 >- assertEquals("The file "+f.getAbsolutePath()+" was not touched!", lastModified+time, f.lastModified()); >+ int n = 1; >+ while (n < 10) { // retry 9 times more if necessary >+ if (f.lastModified() != lastModified) { >+ // We can leave the loop as the file has been really touched >+ return; >+ } >+ f.setLastModified(lastModified + n*time); >+ org.eclipse.jdt.core.tests.util.Util.waitAtLeast(time); >+ n++; >+ } >+ assertFalse("The file "+f.getAbsolutePath()+" was not touched!", lastModified == f.lastModified()); > } > > protected String toString(String[] strings) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 295619
:
152607
|
152610
|
152851
| 159315