mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged 1.4 to HEAD
svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4380 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4386 . git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4659 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.alfresco.repo.cache;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.transaction.Status;
|
||||
import javax.transaction.UserTransaction;
|
||||
@@ -86,6 +87,9 @@ public class CacheTest extends TestCase
|
||||
|
||||
assertEquals("AAA", backingCache.get("A"));
|
||||
|
||||
Collection<String> keys = backingCache.getKeys();
|
||||
assertEquals("Backing cache didn't return correct number of keys", 1, keys.size());
|
||||
|
||||
backingCache.remove("A");
|
||||
assertNull(backingCache.get("A"));
|
||||
}
|
||||
@@ -141,6 +145,11 @@ public class CacheTest extends TestCase
|
||||
assertEquals("Item not updated in txn cache", "XXX", transactionalCache.get(updatedTxnThree));
|
||||
assertFalse("Item was put into backing cache", backingCache.contains(updatedTxnThree));
|
||||
|
||||
// check that the keys collection is correct
|
||||
Collection<String> transactionalKeys = transactionalCache.getKeys();
|
||||
assertFalse("Transactionally removed item found in keys", transactionalKeys.contains(newGlobalOne));
|
||||
assertTrue("Transactionally added item not found in keys", transactionalKeys.contains(updatedTxnThree));
|
||||
|
||||
// commit the transaction
|
||||
txn.commit();
|
||||
|
||||
|
Reference in New Issue
Block a user