AVM now configures itself via Spring. Also adjusted jndi-client and catalina-virtual

to be semi-not-broken.  The current limitation is that you've got to start tomcat from
$TOMCAT_HOME for things to work (fix soon).


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@3267 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2006-06-29 21:37:17 +00:00
parent 7d940d08e1
commit 106273bde8
15 changed files with 261 additions and 114 deletions

View File

@@ -25,6 +25,7 @@ import java.util.TreeMap;
import org.alfresco.repo.avm.hibernate.HibernateHelper;
import org.hibernate.stat.Statistics;
import org.springframework.context.support.FileSystemXmlApplicationContext;
import junit.framework.TestCase;
@@ -38,6 +39,16 @@ public class AVMServiceTestBase extends TestCase
* The AVMService we are testing.
*/
protected AVMService fService;
/**
* The reaper thread.
*/
protected OrphanReaper fReaper;
/**
* The application context.
*/
protected FileSystemXmlApplicationContext fContext;
/**
* The start time of actual work for a test.
@@ -51,11 +62,10 @@ public class AVMServiceTestBase extends TestCase
protected void setUp() throws Exception
{
// HibernateHelper.GetSessionFactory().getStatistics().setStatisticsEnabled(true);
AVMServiceImpl service = new AVMServiceImpl();
service.setStorage("build/test-results/storage");
service.init(true);
fContext = new FileSystemXmlApplicationContext("config/alfresco/avm-test-context.xml");
fService = (AVMService)fContext.getBean("avmService");
fReaper = (OrphanReaper)fContext.getBean("orphanReaper");
fStartTime = System.currentTimeMillis();
fService = service;
}
/* (non-Javadoc)
@@ -69,7 +79,7 @@ public class AVMServiceTestBase extends TestCase
// Statistics stats = HibernateHelper.GetSessionFactory().getStatistics();
// stats.logSummary();
// stats.clear();
HibernateHelper.Reset();
fContext.close();
}
/**