Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Orion (Archived) » "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 PedemonteFriend
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(
	at org.eclipse.orion.server.tests.servlets.files.FileSystemTest.clearWorkspace(
	at org.eclipse.orion.server.tests.servlets.workspace.WorkspaceServiceTest.setUp(
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(
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] &

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 ArthorneFriend
Messages: 176
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:
Previous Topic:The ABCs of workspace organization
Next Topic:Orion 1.0M2 download links broken
Goto Forum:

Current Time: Thu Nov 30 18:55:46 GMT 2023

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

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

Back to the top