mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
BUild fix for test after rev 31230: Disable content quotas by default (ALF-677)
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31259 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -36,6 +36,8 @@ import org.alfresco.repo.model.Repository;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationComponent;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper;
|
||||
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
|
||||
import org.alfresco.repo.usage.ContentUsageImpl;
|
||||
import org.alfresco.repo.usage.UserUsageTrackingComponent;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.security.MutableAuthenticationService;
|
||||
@@ -76,9 +78,6 @@ public class FTPServerTest extends TestCase
|
||||
private final String PASSWORD_THREE="Password03";
|
||||
private final String HOSTNAME="localhost";
|
||||
|
||||
private final String TEST_FOLDER = "FTPServerTest";
|
||||
|
||||
|
||||
private NodeService nodeService;
|
||||
private PersonService personService;
|
||||
private MutableAuthenticationService authenticationService;
|
||||
@@ -103,7 +102,6 @@ public class FTPServerTest extends TestCase
|
||||
ServerConfigurationAccessor fileServerConfiguration = (ServerConfigurationAccessor)applicationContext.getBean("fileServerConfiguration");
|
||||
ftpConfigSection = (FTPConfigSection) fileServerConfiguration.getConfigSection( FTPConfigSection.SectionName);
|
||||
|
||||
|
||||
assertNotNull("nodeService is null", nodeService);
|
||||
assertNotNull("reporitoryHelper is null", repositoryHelper);
|
||||
assertNotNull("personService is null", personService);
|
||||
@@ -588,6 +586,14 @@ public class FTPServerTest extends TestCase
|
||||
*/
|
||||
public void testFtpQuotaAndFtp() throws Exception
|
||||
{
|
||||
// Enable usages
|
||||
ContentUsageImpl contentUsage = (ContentUsageImpl)applicationContext.getBean("contentUsageImpl");
|
||||
contentUsage.setEnabled(true);
|
||||
contentUsage.init();
|
||||
UserUsageTrackingComponent userUsageTrackingComponent = (UserUsageTrackingComponent)applicationContext.getBean("userUsageTrackingComponent");
|
||||
userUsageTrackingComponent.setEnabled(true);
|
||||
userUsageTrackingComponent.bootstrapInternal();
|
||||
|
||||
final String TEST_DIR="/Alfresco/User Homes/" + USER_THREE;
|
||||
|
||||
final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
|
||||
@@ -630,6 +636,13 @@ public class FTPServerTest extends TestCase
|
||||
}
|
||||
finally
|
||||
{
|
||||
// Disable usages
|
||||
contentUsage.setEnabled(false);
|
||||
contentUsage.init();
|
||||
userUsageTrackingComponent.setEnabled(false);
|
||||
userUsageTrackingComponent.bootstrapInternal();
|
||||
|
||||
|
||||
ftpOne.dele(TEST_DIR);
|
||||
if(ftpOne != null)
|
||||
{
|
||||
|
Reference in New Issue
Block a user