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:
Derek Hulley
2006-12-19 15:04:47 +00:00
parent 31d1fa1fb1
commit 4443f42279
14 changed files with 601 additions and 46 deletions

View File

@@ -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();