jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r649543 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java
Date Fri, 18 Apr 2008 13:58:35 GMT
Author: thomasm
Date: Fri Apr 18 06:58:33 2008
New Revision: 649543

URL: http://svn.apache.org/viewvc?rev=649543&view=rev
Log:
JCR-1526: Various improvements to Path and PathImpl - fix test

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java?rev=649543&r1=649542&r2=649543&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/CachingHierarchyManagerTest.java
Fri Apr 18 06:58:33 2008
@@ -43,15 +43,15 @@
         NodeId rootNodeId = new NodeId(UUID.randomUUID());
         ItemStateManager provider = new MyItemStateManager();
         cache = new CachingHierarchyManager(rootNodeId, provider, null);
-        PathFactory factory = PathFactoryImpl.getInstance();
-        final Path path = factory.getRootPath();
-        for(int i=0; i<3; i++) {
+        final PathFactory factory = PathFactoryImpl.getInstance();
+        for (int i = 0; i < 3; i++) {
             new Thread(new Runnable() {
                 public void run() {
-                    while(!stop) {
+                    while (!stop) {
+                        Path path = factory.create("{}\t{}a1");
                         try {
                             cache.resolveNodePath(path);
-                        } catch(Exception e) {
+                        } catch (Exception e) {
                             exception = e;
                         }
                     }
@@ -60,16 +60,18 @@
         }
         Thread.sleep(1000);
         stop = true;
-        if(exception != null) {
+        if (exception != null) {
             throw exception;
         }
     }
 
     static class MyItemStateManager implements ItemStateManager {
 
-        public ItemState getItemState(ItemId id) throws NoSuchItemStateException, ItemStateException
{
-            Name name = NameFactoryImpl.getInstance().create("", "");
-            NodeState ns = new NodeState((NodeId)id, name, null, NodeState.STATUS_NEW, false);
+        public ItemState getItemState(ItemId id)
+                throws NoSuchItemStateException, ItemStateException {
+            Name name = NameFactoryImpl.getInstance().create("", "a1");
+            NodeState ns = new NodeState((NodeId) id, name, null,
+                    NodeState.STATUS_NEW, false);
             ns.setDefinitionId(NodeDefId.valueOf("1"));
             return ns;
         }



Mime
View raw message