build fix.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@32097 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Mark Rogers
2011-11-18 13:39:54 +00:00
parent 3d8c16c772
commit 7dd72bc691
3 changed files with 16 additions and 11 deletions

View File

@@ -285,20 +285,24 @@ public class FTPServerTest extends TestCase
// Wild card
reply = ftp.cwd("/Alfresco/User*Homes");
assertTrue(FTPReply.isPositiveCompletion(reply));
assertTrue("unable to change to /Alfresco User*Homes/", FTPReply.isPositiveCompletion(reply));
// // Single char pattern match
// reply = ftp.cwd("/Alfre?co");
// assertTrue("Unable to match single char /Alfre?co", FTPReply.isPositiveCompletion(reply));
// two level folder
reply = ftp.cwd("/Alfresco/Data Dictionary");
assertTrue(FTPReply.isPositiveCompletion(reply));
assertTrue("unable to change to /Alfresco/Data Dictionary", FTPReply.isPositiveCompletion(reply));
// go up one
reply = ftp.cwd("..");
assertTrue(FTPReply.isPositiveCompletion(reply));
assertTrue("unable to change to ..", FTPReply.isPositiveCompletion(reply));
reply = ftp.pwd();
ftp.getStatus();
assertTrue(FTPReply.isPositiveCompletion(reply));
assertTrue("unable to get status", FTPReply.isPositiveCompletion(reply));
// check we are at the correct point in the tree
reply = ftp.cwd("Data Dictionary");
@@ -386,7 +390,7 @@ public class FTPServerTest extends TestCase
InputStream is2 = ftp.retrieveFileStream(FILE1_NAME);
String content2 = inputStreamToString(is2);
assertEquals("Content is not as expected", content2, FILE1_CONTENT_2);
assertEquals("Content is not as expected", FILE1_CONTENT_2, content2);
ftp.completePendingCommand();
// now delete the file we have been using.

View File

@@ -1084,7 +1084,7 @@ public class ContentDiskDriver2 extends AlfrescoDiskDriver implements ExtendedD
if (logger.isDebugEnabled())
{
logger.debug("Created file: path=" + name + " node=" + nodeRef + " network file=" + netFile);
logger.debug("Created temporary file: path=" + name + " node=" + nodeRef + " network file=" + netFile);
}
}

View File

@@ -192,7 +192,7 @@ class ScenarioOpenFileInstance implements ScenarioInstance
if(name.equalsIgnoreCase(c.getName()))
{
NetworkFile file = c.getNetworkFile();
if(file.isReadOnly())
if(isReadOnly(file))
{
// Read Only File
if(openReadOnlyCount == 1)
@@ -410,9 +410,7 @@ class ScenarioOpenFileInstance implements ScenarioInstance
state = InternalState.OPEN;
//
if(fileHandle.getGrantedAccess() == NetworkFile.READONLY)
//if(fileHandle.isReadOnly())
if(isReadOnly(fileHandle))
{
openReadOnlyCount++;
fileHandleReadOnly=fileHandle;
@@ -442,6 +440,9 @@ class ScenarioOpenFileInstance implements ScenarioInstance
};
}
private boolean isReadOnly(NetworkFile file)
{
return (file.getGrantedAccess() == NetworkFile.READONLY);
}
}