mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-08 14:51:49 +00:00
Merged 5.1.N (5.1.1) to HEAD (5.1)
118308 nsmintanca: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 118237 aleahu: MNT-14853 : Unable to download zip with non primary child - Fixed spacing by removing tabs as per Derek's request. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@123592 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -106,9 +106,9 @@ public class DownloadServiceIntegrationTest
|
||||
private static IntegrityChecker INTEGRITY_CHECKER;
|
||||
|
||||
// Test Content
|
||||
private NodeRef rootFolder;
|
||||
private NodeRef rootFile;
|
||||
private NodeRef secondaryNode;
|
||||
private NodeRef rootFolder;
|
||||
private NodeRef rootFile;
|
||||
private NodeRef secondaryNode;
|
||||
|
||||
private NodeRef level1Folder1;
|
||||
|
||||
@@ -120,13 +120,13 @@ public class DownloadServiceIntegrationTest
|
||||
|
||||
@BeforeClass public static void init()
|
||||
{
|
||||
// Resolve required services
|
||||
// Resolve required services
|
||||
CHECK_OUT_CHECK_IN_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("CheckOutCheckInService", CheckOutCheckInService.class);
|
||||
CONTENT_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("contentService", ContentService.class);
|
||||
DOWNLOAD_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("DownloadService", DownloadService.class);
|
||||
NODE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService", NodeService.class);
|
||||
PERMISSION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("PermissionService", PermissionService.class);
|
||||
TRANSACTION_HELPER = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
|
||||
DOWNLOAD_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("DownloadService", DownloadService.class);
|
||||
NODE_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("NodeService", NodeService.class);
|
||||
PERMISSION_SERVICE = APP_CONTEXT_INIT.getApplicationContext().getBean("PermissionService", PermissionService.class);
|
||||
TRANSACTION_HELPER = APP_CONTEXT_INIT.getApplicationContext().getBean("retryingTransactionHelper", RetryingTransactionHelper.class);
|
||||
INTEGRITY_CHECKER = APP_CONTEXT_INIT.getApplicationContext().getBean("integrityChecker", IntegrityChecker.class);
|
||||
INTEGRITY_CHECKER.setEnabled(true);
|
||||
INTEGRITY_CHECKER.setFailOnViolation(true);
|
||||
@@ -188,11 +188,11 @@ public class DownloadServiceIntegrationTest
|
||||
@Test public void createDownload() throws IOException, InterruptedException
|
||||
{
|
||||
// Initiate the download
|
||||
final NodeRef downloadNode = DOWNLOAD_SERVICE.createDownload(new NodeRef[] {rootFile, rootFolder}, true);
|
||||
final NodeRef downloadNode = DOWNLOAD_SERVICE.createDownload(new NodeRef[] {rootFile, rootFolder}, true);
|
||||
Assert.assertNotNull(downloadNode);
|
||||
|
||||
testNodes.addNodeRef(downloadNode);
|
||||
|
||||
|
||||
// Validate that the download node has been persisted correctly.
|
||||
TRANSACTION_HELPER.doInTransaction(new RetryingTransactionCallback<Object>()
|
||||
{
|
||||
@@ -216,17 +216,17 @@ public class DownloadServiceIntegrationTest
|
||||
return null;
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
DownloadStatus status = getDownloadStatus(downloadNode);
|
||||
while (status.getStatus() == Status.PENDING)
|
||||
{
|
||||
Thread.sleep(PAUSE_TIME);
|
||||
status = getDownloadStatus(downloadNode);
|
||||
}
|
||||
|
||||
Assert.assertEquals(6l, status.getTotalFiles());
|
||||
|
||||
long elapsedTime = waitForDownload(downloadNode);
|
||||
while (status.getStatus() == Status.PENDING)
|
||||
{
|
||||
Thread.sleep(PAUSE_TIME);
|
||||
status = getDownloadStatus(downloadNode);
|
||||
}
|
||||
|
||||
Assert.assertEquals(6l, status.getTotalFiles());
|
||||
|
||||
long elapsedTime = waitForDownload(downloadNode);
|
||||
|
||||
Assert.assertTrue("Maximum creation time exceeded!", elapsedTime < MAX_TIME);
|
||||
|
||||
@@ -386,10 +386,10 @@ public class DownloadServiceIntegrationTest
|
||||
AuthenticationUtil.setFullAuthentication(previousAuth);
|
||||
}
|
||||
|
||||
try
|
||||
try
|
||||
{
|
||||
validateWorkingCopyFolder(preCheckoutExpectedEntries, level1Folder2, TEST_USER2.getUsername());
|
||||
|
||||
|
||||
final Set<String> postCheckoutExpectedEntries = new TreeSet<String>();
|
||||
postCheckoutExpectedEntries.add("level1Folder2/");
|
||||
postCheckoutExpectedEntries.add("level1Folder2/level2File.txt");
|
||||
@@ -408,7 +408,7 @@ public class DownloadServiceIntegrationTest
|
||||
{
|
||||
AuthenticationUtil.setFullAuthentication(previousAuth);
|
||||
}
|
||||
}
|
||||
}
|
||||
validateWorkingCopyFolder(preCheckoutExpectedEntries, level1Folder2, TEST_USER.getUsername());
|
||||
validateWorkingCopyFolder(preCheckoutExpectedEntries, level1Folder2, TEST_USER2.getUsername());
|
||||
}
|
||||
|
Reference in New Issue
Block a user