jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r501921 - /jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
Date Wed, 31 Jan 2007 17:47:48 GMT
Author: reschke
Date: Wed Jan 31 09:47:46 2007
New Revision: 501921

URL: http://svn.apache.org/viewvc?view=rev&rev=501921
Log:
Make sure additional session used by testIsSame() gets closed.

Modified:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java?view=diff&rev=501921&r1=501920&r2=501921
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/PropertyReadMethodsTest.java
Wed Jan 31 09:47:46 2007
@@ -188,10 +188,15 @@
     public void testIsSame() throws RepositoryException {
         // access same property through different session
         Session otherSession = helper.getReadOnlySession();
-        Property otherProperty = otherSession.getRootNode().getNode(testPath).getProperty(property.getName());
-        assertTrue("isSame must return true for the same " +
-                "property retrieved through different sessions.",
-                property.isSame(otherProperty));
+        try {
+            Property otherProperty = otherSession.getRootNode().getNode(testPath).getProperty(property.getName());
+            assertTrue("isSame must return true for the same " +
+                    "property retrieved through different sessions.",
+                    property.isSame(otherProperty));
+        }
+        finally {
+            otherSession.logout();
+        }
     }
 
     /**



Mime
View raw message