I do have a test case:
org.jboss.cache.pojo.collection.CachedListTest that has test for list size after insertion. Can you try that or produce a test case for me?
I've ran the test, and indeed it works in its current form - but not when using optimistic locking (e.g. subsistute 'local-service.xml' in 'replAsync-optimistic-service' in the setUp() method). Results of running unit tests from yesterday's CVS version:
Before (using local-service.xml): [junit] Running org.jboss.cache.pojo.collection.CachedListTest [junit] Tests run: 9, Failures: 0, Errors: 0, Time elapsed: 15.437 sec [junit] Running org.jboss.cache.pojo.collection.CachedListTxTest ? After (using replAsync-optimistic-service.xml): [junit] Running org.jboss.cache.pojo.collection.CachedListTest [junit] Tests run: 9, Failures: 7, Errors: 0, Time elapsed: 43.203 sec [junit] Test org.jboss.cache.pojo.collection.CachedListTest FAILED
I think the problem is that the getChildren() call goes to an OptimisticTreeNode and not to a WorkspaceNode (though WorkspaceNodeImpl doesn't handle getChildren() at all?). The children are not taken from the workspace and so the check of the list size by using getChildren() does not work correctly in optimistic locking mode. Perhaps a simpler way for checking the size (w/o getting the children set) is possible.