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:
Derek Hulley
2011-10-16 21:39:24 +00:00
parent 5444a94509
commit fa0eab2852

View File

@@ -36,6 +36,8 @@ import org.alfresco.repo.model.Repository;
import org.alfresco.repo.security.authentication.AuthenticationComponent; import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.transaction.RetryingTransactionHelper; import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback; 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.NodeRef;
import org.alfresco.service.cmr.repository.NodeService; import org.alfresco.service.cmr.repository.NodeService;
import org.alfresco.service.cmr.security.MutableAuthenticationService; 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 PASSWORD_THREE="Password03";
private final String HOSTNAME="localhost"; private final String HOSTNAME="localhost";
private final String TEST_FOLDER = "FTPServerTest";
private NodeService nodeService; private NodeService nodeService;
private PersonService personService; private PersonService personService;
private MutableAuthenticationService authenticationService; private MutableAuthenticationService authenticationService;
@@ -103,7 +102,6 @@ public class FTPServerTest extends TestCase
ServerConfigurationAccessor fileServerConfiguration = (ServerConfigurationAccessor)applicationContext.getBean("fileServerConfiguration"); ServerConfigurationAccessor fileServerConfiguration = (ServerConfigurationAccessor)applicationContext.getBean("fileServerConfiguration");
ftpConfigSection = (FTPConfigSection) fileServerConfiguration.getConfigSection( FTPConfigSection.SectionName); ftpConfigSection = (FTPConfigSection) fileServerConfiguration.getConfigSection( FTPConfigSection.SectionName);
assertNotNull("nodeService is null", nodeService); assertNotNull("nodeService is null", nodeService);
assertNotNull("reporitoryHelper is null", repositoryHelper); assertNotNull("reporitoryHelper is null", repositoryHelper);
assertNotNull("personService is null", personService); assertNotNull("personService is null", personService);
@@ -588,6 +586,14 @@ public class FTPServerTest extends TestCase
*/ */
public void testFtpQuotaAndFtp() throws Exception 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 String TEST_DIR="/Alfresco/User Homes/" + USER_THREE;
final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper(); final RetryingTransactionHelper tran = transactionService.getRetryingTransactionHelper();
@@ -630,6 +636,13 @@ public class FTPServerTest extends TestCase
} }
finally finally
{ {
// Disable usages
contentUsage.setEnabled(false);
contentUsage.init();
userUsageTrackingComponent.setEnabled(false);
userUsageTrackingComponent.bootstrapInternal();
ftpOne.dele(TEST_DIR); ftpOne.dele(TEST_DIR);
if(ftpOne != null) if(ftpOne != null)
{ {