1Merged V4.0-BUG-FIX to HEAD

35438: Merged BRANCHES/DEV/THOR0 to BRANCHES/DEV/V4.0-BUG-FIX:
       - fix merge issue (THOR-4 / ALF-13756)
   35446: Merged BRANCHES/DEV/THOR0 to BRANCHES/DEV/V4.0-BUG-FIX:
      29422: record-only
      29453: build/test fix (AspectTest, PolicyTest, WebScriptTestSuite)
   35448: ALF-13770: Merged V3.4-BUG-FIX (3.4.10) to V4.0-BUG-FIX (4.0.2)
      35447: ALF-13769: Merged V3.4.8 (3.4.8.7) to V3.4-BUG-FIX (3.4.10)
         35435: ALF-11535 Home Folder Synchronizer fails when destination folder already exists
            - HomeFolderProviderSynchronizerTest was broken on build m/c because PersonTest (in the same suite) created
              its own UserNameMatcherImpl and left it attached to the personServiceImpl.
         35413: ALF-11535 Home Folder Synchronizer (HFS) fails when destination folder already exists
            - HomeFolderManager no longer returns an existing folder (unless the provider is an ExistingPathBasedHomeFolderProvider*),
              but will append -N (where N is an integer) so that a new folder is always created.
              This fixes an unreported bug (when case sensitive user names are in use) that users created in Share that only differ
              in case would have shared the same home folder.
            - Modified HFS to log more 'info' rather than 'debug' messages so it is possible for administrators to understand the moves
              and errors better.
            - Modified HFS to understand that Alfresco does not allow duplicate folders/content when case is ignored.
            - Added unit test for case insensitive user names.
            - Modified HFS to allows folder structure to change case on re-sync
   35451: Fix for ALF-13503 Add SOLR client API tests to the SystemBuildTest project
   - missed keystore from checkin
   35454: Improved solution for ALF-13286 - after changes to "SiteService" ProxyFactoryBean definition from Andy.
    - now checks user ability to execute the SiteService.createSite() method based on ACLs defined - avoiding AccessDeniedException.
   35462: Merged BRANCHES/DEV/THOR1 to BRANCHES/DEV/V4.0-BUG-FIX:
   - minor manual merge (to avoid future conflict)
   35465: Fix for ALF-13454 - Advanced search date picker missing the additional pop up
   35475: ALF-12780 - CIFS and TextEdit shuffle
   35495: ALF-13753: Prevent users from editing the name of locked documents in Share via the insitu editor


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@35499 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2012-04-20 16:51:08 +00:00
parent 94f6320f57
commit fa1f4c3276
30 changed files with 919 additions and 345 deletions

View File

@@ -4733,18 +4733,16 @@ public class ContentDiskDriverTest extends TestCase
* This test tries to simulate the cifs shuffling that is done
* from Save from Mac Lion by TextEdit
*
* a) Lock file created. (._test.txt)
* b) Temp file created in temporary folder (test.txt)
* c) Target file deleted
* d) Temp file renamed to target file.
* e) Lock file deleted
*
* a) Temp file created in temporary folder (test.txt)
* b) Resource fork file created in temporary folder (._test.txt)
* b) Target file deleted
* c) Temp file moved to target file.
*/
public void DISABLED_TestScenarioMacLionTextEdit() throws Exception
public void testScenarioMacLionTextEdit() throws Exception
{
logger.debug("testScenarioLionTextEdit");
final String FILE_NAME = "test.txt";
final String LOCK_FILE_NAME = "._test.txt";
final String FORK_FILE_NAME = "._test.txt";
final String TEMP_FILE_NAME = "test.txt";
final String UPDATED_TEXT = "Mac Lion Text Updated Content";
@@ -4813,23 +4811,10 @@ public class ContentDiskDriverTest extends TestCase
driver.writeFile(testSession, testConnection, testContext.tempFileHandle, testContentBytes, 0, testContentBytes.length, 0);
driver.closeFile(testSession, testConnection, testContext.tempFileHandle);
return null;
}
};
tran.doInTransaction(createFileCB, false, true);
/**
* a) create the lock file
*/
RetryingTransactionCallback<Void> createLockFileCB = new RetryingTransactionCallback<Void>() {
@Override
public Void execute() throws Throwable
{
/**
* Create the lock file we are going to use
* Create the temp resource fork file we are going to use
*/
FileOpenParams createFileParams = new FileOpenParams(TEST_DIR + "\\" + LOCK_FILE_NAME, 0, AccessMode.ReadWrite, FileAttribute.NTNormal, 0);
createFileParams = new FileOpenParams(TEST_TEMP_DIR + "\\" + FORK_FILE_NAME, 0, AccessMode.ReadWrite, FileAttribute.NTNormal, 0);
testContext.lockFileHandle = driver.createFile(testSession, testConnection, createFileParams);
assertNotNull(testContext.lockFileHandle);
testContext.lockFileHandle.closeFile();
@@ -4840,12 +4825,11 @@ public class ContentDiskDriverTest extends TestCase
testContext.testNodeRef = getNodeForPath(testConnection, TEST_DIR + "\\" + FILE_NAME);
nodeService.addAspect(testContext.testNodeRef, ContentModel.ASPECT_VERSIONABLE, null);
return null;
}
};
tran.doInTransaction(createLockFileCB, false, true);
tran.doInTransaction(createFileCB, false, true);
/**
* b) Delete the target file
*/
@@ -4869,28 +4853,15 @@ public class ContentDiskDriverTest extends TestCase
public Void execute() throws Throwable
{
driver.renameFile(testSession, testConnection, TEST_TEMP_DIR + "\\" + TEMP_FILE_NAME, TEST_DIR + "\\" + FILE_NAME);
driver.renameFile(testSession, testConnection, TEST_TEMP_DIR + "\\" + FORK_FILE_NAME, TEST_DIR + "\\" + FORK_FILE_NAME);
return null;
}
};
tran.doInTransaction(moveTempFileCB, false, true);
/**
* d) Delete Lock File
* Validate results.
*/
RetryingTransactionCallback<Void> deleteLockFileCB = new RetryingTransactionCallback<Void>() {
@Override
public Void execute() throws Throwable
{
driver.deleteFile(testSession, testConnection, TEST_DIR + "\\" + LOCK_FILE_NAME);
return null;
}
};
tran.doInTransaction(deleteLockFileCB, false, true);
RetryingTransactionCallback<Void> validateCB = new RetryingTransactionCallback<Void>() {
@Override
@@ -4900,7 +4871,7 @@ public class ContentDiskDriverTest extends TestCase
NodeRef shuffledNodeRef = getNodeForPath(testConnection, TEST_DIR + "\\" + FILE_NAME);
assertEquals("shuffledNode ref is different", shuffledNodeRef, testContext.testNodeRef);
assertTrue("", nodeService.hasAspect(shuffledNodeRef, ContentModel.ASPECT_VERSIONABLE));
assertTrue("node is not versionable", nodeService.hasAspect(shuffledNodeRef, ContentModel.ASPECT_VERSIONABLE));
ContentReader reader = contentService.getReader(shuffledNodeRef, ContentModel.PROP_CONTENT);
assertNotNull("Reader is null", reader);