jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r791492 - in /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data: GCConcurrentTest.java TestTwoGetStreams.java
Date Mon, 06 Jul 2009 14:39:12 GMT
Author: thomasm
Date: Mon Jul  6 14:39:12 2009
New Revision: 791492

URL: http://svn.apache.org/viewvc?rev=791492&view=rev
Log:
JCR-2162 Data Store: garbage collection continues when the session is closed - fix test case

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/GCConcurrentTest.java
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/TestTwoGetStreams.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/GCConcurrentTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/GCConcurrentTest.java?rev=791492&r1=791491&r2=791492&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/GCConcurrentTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/GCConcurrentTest.java
Mon Jul  6 14:39:12 2009
@@ -78,6 +78,7 @@
         Thread.sleep(10);
         gc.setStop(true);
         Thread.sleep(10);
+        gcThread.join();
         gc.throwException();
     }
 

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/TestTwoGetStreams.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/TestTwoGetStreams.java?rev=791492&r1=791491&r2=791492&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/TestTwoGetStreams.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/data/TestTwoGetStreams.java
Mon Jul  6 14:39:12 2009
@@ -38,12 +38,12 @@
     private static Logger log = LoggerFactory.getLogger(TestTwoGetStreams.class);
 
     private static final int STREAM_LENGTH = 256 * 1024;
-    
+
     private boolean isDataStoreEnabled() throws RepositoryException {
         RepositoryImpl rep = (RepositoryImpl) superuser.getRepository();
         return rep.getDataStore() != null;
     }
-    
+
     /**
      * Test the JackrabbitValue.getContentIdentity feature.
      */
@@ -52,7 +52,7 @@
             log.info("testContentIdentity skipped. Data store is not used.");
             return;
         }
-        
+
         Node root = superuser.getRootNode();
         ValueFactory vf = superuser.getValueFactory();
         root.setProperty("p1", vf.createBinary(new RandomInputStream(1, STREAM_LENGTH)));
@@ -69,7 +69,7 @@
             assertNotNull(id1);
             assertEquals(id1, id2);
         }
-        
+
         // copying a value should not stream the content
         long time = System.currentTimeMillis();
         for (int i = 0; i < 100; i++) {
@@ -80,10 +80,10 @@
         time = System.currentTimeMillis() - time;
         // streaming 1 MB again and again takes about 4.3 seconds
         // on my computer; copying the data identifier takes about 16 ms
-        assertTrue(time < 100);
+        assertTrue("time: " + time, time < 100);
 
     }
-    
+
     /**
      * Test reading from two concurrently opened streams.
      */
@@ -92,7 +92,7 @@
             log.info("testContentIdentity skipped. Data store is not used.");
             return;
         }
-        
+
         Node root = superuser.getRootNode();
         ValueFactory vf = superuser.getValueFactory();
         root.setProperty("p1", vf.createBinary(new RandomInputStream(1, STREAM_LENGTH)));
@@ -123,7 +123,7 @@
             log.info("testContentIdentity skipped. Data store is not used.");
             return;
         }
-        
+
         Node root = superuser.getRootNode();
         ValueFactory vf = superuser.getValueFactory();
         root.setProperty("p1", vf.createBinary(new RandomInputStream(1, STREAM_LENGTH)));
@@ -154,7 +154,7 @@
             log.info("testContentIdentity skipped. Data store is not used.");
             return;
         }
-        
+
         Node root = superuser.getRootNode();
         ValueFactory vf = superuser.getValueFactory();
         root.setProperty("p1", vf.createBinary(new RandomInputStream(1, STREAM_LENGTH)));



Mime
View raw message