Bug 379284

Summary: Fix resource tests relying on D: drive
Product: [Eclipse Project] Platform Reporter: John Arthorne <john.arthorne>
Component: ResourcesAssignee: John Arthorne <john.arthorne>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: Szymon.Brandys
Version: 3.7.1Keywords: test
Target Milestone: 3.8 RC1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description John Arthorne CLA 2012-05-11 13:13:48 EDT
There is no D: drive on the Hudson windows slave, but we have Resources tests that assume the existence of one. However Hudson windows slave does have an E: drive (bug 328851). We should fix our tests to refer to that.
Comment 1 John Arthorne CLA 2012-05-11 13:15:22 EDT
Current failures:

1) 

junit.framework.AssertionFailedError: 1.0: org.eclipse.core.runtime.CoreException: Could not write file: D:\90835c2da39a00111c6af474ee000df4.
at org.eclipse.core.tests.harness.CoreTest.fail(CoreTest.java:67)
at org.eclipse.core.tests.internal.alias.BasicAliasTest.testBug198571(BasicAliasTest.java:261)

2)

D:\f01e35e0a39a00111c6af474ee000df4.

junit.framework.AssertionFailedError: 0.0: org.eclipse.core.runtime.CoreException: Could not write file: D:\f01e35e0a39a00111c6af474ee000df4.
at org.eclipse.core.tests.harness.CoreTest.fail(CoreTest.java:67)
at org.eclipse.core.tests.internal.localstore.MoveTest.testMoveFolderAcrossVolumes(MoveTest.java:205)

3)

0.0: org.eclipse.core.runtime.CoreException: Could not write file: D:\a0b9cbe0a39a00111c6af474ee000df4.

junit.framework.AssertionFailedError: 0.0: org.eclipse.core.runtime.CoreException: Could not write file: D:\a0b9cbe0a39a00111c6af474ee000df4.
at org.eclipse.core.tests.harness.CoreTest.fail(CoreTest.java:67)
at org.eclipse.core.tests.internal.localstore.MoveTest.testMoveFileAcrossVolumes(MoveTest.java:75)
Comment 2 Szymon Brandys CLA 2012-05-11 13:24:09 EDT
We have a util method that looks for an available drive to test. I'll take a look.
Comment 3 John Arthorne CLA 2012-05-11 13:36:28 EDT
I didn't realize you were still around ;)

All three of these tests use that helper method (ResourceTest.findAvailableDevices). It seems in this case java.io.File#canWrite is returning true but in fact we are still not allowed to write. I have a change that I can try to see if we can improve this method.
Comment 4 John Arthorne CLA 2012-05-11 13:43:36 EDT
Trying something different in that test helper method... we'll see if that does the trick.

http://git.eclipse.org/c/platform/eclipse.platform.resources.git/commit/?id=04ef5def15b7ac819c89fe9843018347f53a38b8
Comment 5 John Arthorne CLA 2012-05-17 11:50:27 EDT
My fix worked.
Comment 6 John Arthorne CLA 2012-05-17 11:50:44 EDT
Verified in I20120516-1900