mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Migrate codebase onto Spring 3.0.5. There is an issue with using annotation based test cases that I haven't got to the bottom of yet. I have posted on the SpringSource forum here:
http://forum.springsource.org/showthread.php?111842-ConfigurationClassPostProcessor-IllegalStateException-when-starting-test-case As a workaround I have converted all such test cases so that they simply use the "normal" BaseSpringTest super class. Fortunately there were only eight or nine such classes. Although I have run quite a number of tests on the result I haven't run every test there is, so there may be some fallout. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28904 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -49,31 +49,19 @@ import org.alfresco.service.cmr.site.SiteVisibility;
|
||||
import org.alfresco.service.cmr.workflow.WorkflowService;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.alfresco.service.namespace.QName;
|
||||
import org.alfresco.util.BaseSpringTest;
|
||||
import org.alfresco.util.GUID;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.transaction.TransactionConfiguration;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @author Brian
|
||||
*
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(locations = { "classpath:alfresco/application-context.xml" })
|
||||
@TransactionConfiguration(transactionManager = "transactionManager", defaultRollback = true)
|
||||
@Transactional
|
||||
public class PublishingIntegratedTest
|
||||
public class PublishingIntegratedTest extends BaseSpringTest
|
||||
{
|
||||
private static String channelName = "Test Channel - Name";
|
||||
|
||||
@Autowired
|
||||
protected ApplicationContext applicationContext;
|
||||
protected ServiceRegistry serviceRegistry;
|
||||
protected RetryingTransactionHelper retryingTransactionHelper;
|
||||
protected NodeService nodeService;
|
||||
@@ -92,7 +80,7 @@ public class PublishingIntegratedTest
|
||||
* @throws java.lang.Exception
|
||||
*/
|
||||
@Before
|
||||
public void setUp() throws Exception
|
||||
public void onSetUp() throws Exception
|
||||
{
|
||||
serviceRegistry = (ServiceRegistry) applicationContext.getBean(ServiceRegistry.SERVICE_REGISTRY);
|
||||
serviceRegistry.getAuthenticationService().authenticate("admin", "admin".toCharArray());
|
||||
|
Reference in New Issue
Block a user