mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix tearDown code for UsageTestSuite classes
- Ensure that we either commit (successfully) or do rollback - Added leaked transaction detection to tests - ALF-19787: RED BUILD: Build repeatedly hanging in UsageTestSuite git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54587 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -30,6 +30,7 @@ import junit.framework.TestCase;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.content.MimetypeMap;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationUtil;
|
||||
import org.alfresco.repo.transaction.AlfrescoTransactionSupport;
|
||||
import org.alfresco.service.cmr.repository.ChildAssociationRef;
|
||||
import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
@@ -79,6 +80,11 @@ public class UserUsageTrackingComponentTest extends TestCase
|
||||
|
||||
protected void setUp() throws Exception
|
||||
{
|
||||
if (AlfrescoTransactionSupport.isActualTransactionActive())
|
||||
{
|
||||
fail("Test started with transaction in progress");
|
||||
}
|
||||
|
||||
nodeService = (NodeService)applicationContext.getBean("NodeService");
|
||||
authenticationService = (MutableAuthenticationService)applicationContext.getBean("authenticationService");
|
||||
transactionService = (TransactionService)applicationContext.getBean("transactionComponent");
|
||||
|
Reference in New Issue
Block a user