Bug 379284 - Fix resource tests relying on D: drive
Summary: Fix resource tests relying on D: drive
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Resources (show other bugs)
Version: 3.7.1   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 RC1   Edit
Assignee: John Arthorne CLA
QA Contact:
URL:
Whiteboard:
Keywords: test
Depends on:
Blocks:
 
Reported: 2012-05-11 13:13 EDT by John Arthorne CLA
Modified: 2012-05-22 05:47 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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