You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by st...@apache.org on 2015/08/27 09:35:54 UTC

svn commit: r1698085 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java

Author: stefanegli
Date: Thu Aug 27 07:35:54 2015
New Revision: 1698085

URL: http://svn.apache.org/r1698085
Log:
OAK-3292 : using explicit, logged, configurable seed for testLargeStartStopFiesta so that error cases can easily be reproduced

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java?rev=1698085&r1=1698084&r2=1698085&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/document/DocumentDiscoveryLiteServiceTest.java Thu Aug 27 07:35:54 2015
@@ -550,6 +550,9 @@ public class DocumentDiscoveryLiteServic
 //    private static final boolean MONGO_DB = true;
      private static final boolean MONGO_DB = false;
 
+    private static final int SEED = Integer.getInteger(DocumentDiscoveryLiteServiceTest.class.getSimpleName() + "-seed",
+            new Random().nextInt());
+
     private List<DocumentMK> mks = Lists.newArrayList();
     private MemoryDocumentStore ds;
     private MemoryBlobStore bs;
@@ -888,10 +891,10 @@ public class DocumentDiscoveryLiteServic
      */
     @Test
     public void testLargeStartStopFiesta() throws Throwable {
-        logger.info("testLargeStartStopFiesta: start");
+        logger.info("testLargeStartStopFiesta: start, seed="+SEED);
         final List<SimplifiedInstance> instances = new LinkedList<SimplifiedInstance>();
         final Map<Integer, String> inactiveIds = new HashMap<Integer, String>();
-        final Random random = new Random();
+        final Random random = new Random(SEED);
         final int LOOP_CNT = 50; // with too many loops have also seen mongo
                                  // connections becoming starved thus test
                                  // failed
@@ -1020,6 +1023,7 @@ public class DocumentDiscoveryLiteServic
     @Before
     @After
     public void clear() {
+        logger.info("clear: seed="+SEED);
         for (SimplifiedInstance i : allInstances) {
             i.dispose();
         }