Some test cleanup to help with profiling

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@2305 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-02-06 16:49:02 +00:00
parent cecaaf4fd3
commit c396613cdd

View File

@@ -57,6 +57,15 @@ public class CacheTest extends TestCase
transactionalCache = (SimpleCache<String, Serializable>) ctx.getBean("transactionalCache");
}
@Override
public void tearDown()
{
serviceRegistry = null;
standaloneCache = null;
backingCache = null;
transactionalCache = null;
}
public void testSetUp() throws Exception
{
CacheManager cacheManager = (CacheManager) ctx.getBean("ehCacheManager");
@@ -116,11 +125,11 @@ public class CacheTest extends TestCase
TransactionService transactionService = serviceRegistry.getTransactionService();
UserTransaction txn = transactionService.getUserTransaction();
try
{
// begin a transaction
txn.begin();
try
{
// remove 1 from the cache
transactionalCache.remove(newGlobalOne);
assertFalse("Item was not removed from txn cache", transactionalCache.contains(newGlobalOne));