Hide Forgot
Link type: Superset, Source: SOA-2447, Destination: SOA-2441 project_key: SOA Some of FileSystemConnector tests are failing on NFS drive. Several tests are failing Example <testcase classname="org.modeshape.connector.filesystem.FileSystemConnectorWritableTest" name="shouldBeAbleToCreateFileWithContent" time="3.818"> <failure type="junit.framework.AssertionFailedError">junit.framework.AssertionFailedError: at org.modeshape.connector.filesystem.FileSystemConnectorWritableTest.assertContents(FileSystemConnectorWritableTest.java:598) at org.modeshape.connector.filesystem.FileSystemConnectorWritableTest.shouldBeAbleToCreateFileWithContent(FileSystemConnectorWritableTest.java:135) </failure> </testcase> Moreover an exception is printed to standard error org.modeshape.graph.connector.RepositorySourceException: Error moving temporary data file to path "/tmp/modeshape5274288099061789508.tmp to /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile" in workspace "test" in Test Repository at org.modeshape.connector.filesystem.FileSystemWorkspace.putNode(FileSystemWorkspace.java:309) at org.modeshape.graph.connector.base.PathWorkspace$PutCommand.apply(PathWorkspace.java:270) at org.modeshape.graph.connector.base.PathWorkspace.commit(PathWorkspace.java:204) at org.modeshape.graph.connector.base.PathTransaction$WorkspaceChanges.commit(PathTransaction.java:896) at org.modeshape.graph.connector.base.PathTransaction.commit(PathTransaction.java:787) at org.modeshape.graph.connector.base.Connection.execute(Connection.java:130) at org.modeshape.graph.Graph.execute(Graph.java:283) at org.modeshape.graph.Graph$5.process(Graph.java:226) at org.modeshape.graph.request.RequestBuilder.createNode(RequestBuilder.java:289) at org.modeshape.graph.Graph$13.submit(Graph.java:1342) at org.modeshape.graph.Graph$13.submit(Graph.java:1335) at org.modeshape.graph.Graph$CreateAction.and(Graph.java:7995) I have tweaked FileSystemWorkspace source code a little bit and I have found that in method putNode there is a condition if (!temp.renameTo(parentFile)) { that is evaluated to true. I have added an information lines to be printed in the condition System.err.println("UPDATE ERROR " + temp.getCanonicalPath() + " " + parentFile.getCanonicalPath()); System.err.println("UPDATE " + temp.exists()); System.err.println("UPDATE " + parentFile.exists()); System.err.println("UPDATE " + parentFile.getParentFile().exists()); Which gives me result UPDATE ERROR /tmp/modeshape5274288099061789508.tmp /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile UPDATE true UPDATE false UPDATE true and when I tried to execute 'mv /tmp/modeshape5274288099061789508.tmp /qa/services/hudson/hudson_workspace/workspace/soa-modeshape-single/modeshape/extensions/modeshape-connector-filesystem/target/repositories/test/testFile' then the command was executed successfully.
I probably now the explanation - the temp file is generate din /tmp directory but the target (repository) is on mounted mount point. According to documentation - 'The rename operation might not be able to move a file from one filesystem to another' I see current implementation as serious limitation as it would require to have tmp mountpoint on the same filesystem the repository.
Affects Testing: Added: [Blocks Testing]
Link: Added: This issue depends MODE-973
Link: Added: This issue incorporates SOA-2441
Just wondering - are you seeing the same (or different) issues if you try to access a file through a symbolic link?
ModeShape committed changes on Oct. 20 to the 2.2.x branch. This should be in ER4.
Verified in ER4