Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Orion » "Could not delete read-only file" error running server tests
"Could not delete read-only file" error running server tests [message #919158] Fri, 21 September 2012 18:40 Go to next message
Javier Pedemonte is currently offline Javier Pedemonte
Messages: 5
Registered: July 2009
Junior Member
I'm trying to test a patch on the Orion 0.5 source, but having some issues with the server tests.

I've setup my source and tests according to the wiki [1]. Since I'm testing again Orion 0.5, I downloaded and used that as the "target platform". I also checked out the "R0_5" tag. I assume that's correct.

Before making any changes to the source, I ran the server tests. I get 25 errors, in the following sections:

* testETagHandling
* everything in WorkspaceServiceTest
* everything in AllSiteTests

The stack traces all look similar:

org.eclipse.core.runtime.CoreException: Problems encountered while deleting files.
	at org.eclipse.core.internal.filesystem.local.LocalFile.delete(LocalFile.java:125)
	at org.eclipse.orion.server.tests.servlets.files.FileSystemTest.clearWorkspace(FileSystemTest.java:63)
	at org.eclipse.orion.server.tests.servlets.workspace.WorkspaceServiceTest.setUp(WorkspaceServiceTest.java:134)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
            ...
Contains: Could not delete read-only file: /Users/Shared/workspaces/junit-workspace/testMetadataHandling.txt.


That file is indeed set as read-only. I even have to use "sudo" in order to delete it myself.

Why is Orion creating this file as read-only? I'm running on Eclipse Juno, Mac OS X 10.8...


[1] http://wiki.eclipse.org/Orion/Getting_the_source & http://wiki.eclipse.org/Orion/Running_the_tests


javier
Re: "Could not delete read-only file" error running server tests [message #924093 is a reply to message #919158] Wed, 26 September 2012 13:57 Go to previous message
John Arthorne is currently offline John Arthorne
Messages: 174
Registered: July 2009
Senior Member
Well, the server API allows a client to set and retrieve permissions of files in the workspace. This test is setting a file to be read only to validate that works. I suspect this is a difference on Mac because on Linux and Windows it allows us to delete this in the test without explicitly making it writeable. I have made a change to make the file writeable at the end of the test:

http://git.eclipse.org/c/orion/org.eclipse.orion.server.git/commit/?id=b040cd51d6542901c7d956d3aa1e5f98c5fe9303
Previous Topic:The ABCs of workspace organization
Next Topic:Orion 1.0M2 download links broken
Goto Forum:
  


Current Time: Thu Oct 30 15:27:32 GMT 2014

Powered by FUDForum. Page generated in 0.03293 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software