Merged DEV to HEAD

31651: Fixed up concurrency tests: target concurrent aspect adds in addition to numeric property increments
   31652: Ensure DB-based concurrency problems are propagated when updating alf_node (not just optimistic lock detections)
   31823: TransactionalCache provides REPEATABLE READ
          - Values found in shared cache are placed into transactional cache
          - Previously, values could keep changing until first write (READ COMMITTED)
            but now the first read sets the value until it is changed by the current
            transaction
   31825: Minor comment about node version rollover after version=32767
   31826: Immutable node caches: properties, aspects and parent assocs are immutable
          - cache entries are only put but never updated
          - zero cluster overhead for these 3 caches
          - Stale nodeCache detection when reading properties, aspects or parent assocs
          - Added tests to introspect on the caches directly to validate behaviour
          - Ensure that each node gets a single version increment per transaction
   31854: Cater for cm:auditable changes during touchNode()


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@31912 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2011-11-11 16:37:07 +00:00
parent cca70d44b8
commit ae202a3f24
8 changed files with 679 additions and 357 deletions

View File

@@ -204,6 +204,13 @@ public class CacheTest extends TestCase
assertNull("Get didn't return null", transactionalCache.get(NEW_GLOBAL_ONE));
assertTrue("Item was removed from backing cache", backingCache.contains(NEW_GLOBAL_ONE));
// read 2 from the cache
assertEquals("Item not read from backing cache", NEW_GLOBAL_TWO, transactionalCache.get(NEW_GLOBAL_TWO));
// Change the backing cache
backingCache.put(NEW_GLOBAL_TWO, NEW_GLOBAL_TWO + "-updated");
// Ensure read-committed
assertEquals("Read-committed not preserved", NEW_GLOBAL_TWO, transactionalCache.get(NEW_GLOBAL_TWO));
// update 3 in the cache
transactionalCache.put(UPDATE_TXN_THREE, "XXX");
assertEquals("Item not updated in txn cache", "XXX", transactionalCache.get(UPDATE_TXN_THREE));