jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r602131 - in /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core: ./ nodetype/ query/
Date Fri, 07 Dec 2007 15:49:02 GMT
Author: mreutegg
Date: Fri Dec  7 07:49:01 2007
New Revision: 602131

URL: http://svn.apache.org/viewvc?rev=602131&view=rev
Log:
JCR-1224: Release references to JCR items in tearDown

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentSaveTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/XATest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ConcurrentQueryTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/DerefTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/LimitAndOffsetTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SkipDeletedNodesTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/XPathAxisTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentSaveTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentSaveTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentSaveTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/ConcurrentSaveTest.java
Fri Dec  7 07:49:01 2007
@@ -50,9 +50,11 @@
         try {
             if (addNodeSession != null) {
                 addNodeSession.logout();
+                addNodeSession = null;
             }
             if (removePropertySession != null) {
                 removePropertySession.logout();
+                removePropertySession = null;
             }
         } finally {
             super.tearDown();

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/XATest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/XATest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/XATest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/XATest.java
Fri Dec  7 07:49:01 2007
@@ -82,6 +82,7 @@
     protected void tearDown() throws Exception {
         if (otherSuperuser != null) {
             otherSuperuser.logout();
+            otherSuperuser = null;
         }
         super.tearDown();
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/nodetype/CyclicNodeTypeRegistrationTest.java
Fri Dec  7 07:49:01 2007
@@ -89,7 +89,11 @@
     protected void tearDown() throws Exception {
         if (session != null) {
             session.logout();
+            session = null;
         }
+        ntreg = null;
+        ntDefCollection = null;
+        nameFactory = null;
         super.tearDown();
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ConcurrentQueryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ConcurrentQueryTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ConcurrentQueryTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/ConcurrentQueryTest.java
Fri Dec  7 07:49:01 2007
@@ -63,6 +63,7 @@
         for (Iterator it = readSessions.iterator(); it.hasNext(); ) {
             ((Session) it.next()).logout();
         }
+        readSessions.clear();
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/DerefTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/DerefTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/DerefTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/DerefTest.java
Fri Dec  7 07:49:01 2007
@@ -87,6 +87,19 @@
         testRootNode.save();
     }
 
+    protected void tearDown() throws Exception {
+        andrew = null;
+        bill = null;
+        carl = null;
+        daren = null;
+        eric = null;
+        frank = null;
+        sun = null;
+        microsoft = null;
+        ibm = null;
+        super.tearDown();
+    }
+
     /**
      * Tests various XPath queries with jcr:deref() function.
      */

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/LimitAndOffsetTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/LimitAndOffsetTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/LimitAndOffsetTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/LimitAndOffsetTest.java
Fri Dec  7 07:49:01 2007
@@ -33,6 +33,14 @@
         query = createXPathQuery("/jcr:root" + testRoot + "/* order by @name");
     }
 
+    protected void tearDown() throws Exception {
+        node1 = null;
+        node2 = null;
+        node3 = null;
+        query = null;
+        super.tearDown();
+    }
+
     private QueryImpl createXPathQuery(String xpath)
             throws InvalidQueryException, RepositoryException {
         QueryManager queryManager = superuser.getWorkspace().getQueryManager();

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SkipDeletedNodesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SkipDeletedNodesTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SkipDeletedNodesTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/SkipDeletedNodesTest.java
Fri Dec  7 07:49:01 2007
@@ -45,8 +45,10 @@
         try {
             if (s2 != null) {
                 s2.logout();
+                s2 = null;
             }
         } finally {
+            qm = null;
             super.tearDown();
         }
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/XPathAxisTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/XPathAxisTest.java?rev=602131&r1=602130&r2=602131&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/XPathAxisTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/XPathAxisTest.java
Fri Dec  7 07:49:01 2007
@@ -42,6 +42,16 @@
         testRootNode.save();
     }
 
+    protected void tearDown() throws Exception {
+        n1 = null;
+        n2 = null;
+        n11 = null;
+        n12 = null;
+        n21 = null;
+        n22 = null;
+        super.tearDown();
+    }
+
     public void testChildAxisRoot() throws RepositoryException {
         String xpath = "/*";
         executeXPathQuery(xpath, new Node[]{superuser.getRootNode()});



Mime
View raw message