mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
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:
@@ -57,6 +57,15 @@ public class CacheTest extends TestCase
|
|||||||
transactionalCache = (SimpleCache<String, Serializable>) ctx.getBean("transactionalCache");
|
transactionalCache = (SimpleCache<String, Serializable>) ctx.getBean("transactionalCache");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void tearDown()
|
||||||
|
{
|
||||||
|
serviceRegistry = null;
|
||||||
|
standaloneCache = null;
|
||||||
|
backingCache = null;
|
||||||
|
transactionalCache = null;
|
||||||
|
}
|
||||||
|
|
||||||
public void testSetUp() throws Exception
|
public void testSetUp() throws Exception
|
||||||
{
|
{
|
||||||
CacheManager cacheManager = (CacheManager) ctx.getBean("ehCacheManager");
|
CacheManager cacheManager = (CacheManager) ctx.getBean("ehCacheManager");
|
||||||
@@ -116,11 +125,11 @@ public class CacheTest extends TestCase
|
|||||||
|
|
||||||
TransactionService transactionService = serviceRegistry.getTransactionService();
|
TransactionService transactionService = serviceRegistry.getTransactionService();
|
||||||
UserTransaction txn = transactionService.getUserTransaction();
|
UserTransaction txn = transactionService.getUserTransaction();
|
||||||
// begin a transaction
|
|
||||||
txn.begin();
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
// begin a transaction
|
||||||
|
txn.begin();
|
||||||
|
|
||||||
// remove 1 from the cache
|
// remove 1 from the cache
|
||||||
transactionalCache.remove(newGlobalOne);
|
transactionalCache.remove(newGlobalOne);
|
||||||
assertFalse("Item was not removed from txn cache", transactionalCache.contains(newGlobalOne));
|
assertFalse("Item was not removed from txn cache", transactionalCache.contains(newGlobalOne));
|
||||||
|
Reference in New Issue
Block a user