lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From markrmil...@apache.org
Subject svn commit: r1403131 - /lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
Date Mon, 29 Oct 2012 00:00:16 GMT
Author: markrmiller
Date: Mon Oct 29 00:00:15 2012
New Revision: 1403131

URL: http://svn.apache.org/viewvc?rev=1403131&view=rev
Log:
when we timeout waiting for recoveries to finish, print the zk cluster state and current stack
traces for all threads

Modified:
    lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java

Modified: lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java?rev=1403131&r1=1403130&r2=1403131&view=diff
==============================================================================
--- lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
(original)
+++ lucene/dev/trunk/solr/test-framework/src/java/org/apache/solr/cloud/AbstractDistribZkTestBase.java
Mon Oct 29 00:00:15 2012
@@ -113,7 +113,7 @@ public abstract class AbstractDistribZkT
   
   protected void waitForRecoveriesToFinish(String collection, ZkStateReader zkStateReader,
boolean verbose, boolean failOnTimeout)
       throws Exception {
-    waitForRecoveriesToFinish(collection, zkStateReader, verbose, failOnTimeout, 600 * (TEST_NIGHTLY
? 2 : 1) * RANDOM_MULTIPLIER);
+    waitForRecoveriesToFinish(collection, zkStateReader, verbose, failOnTimeout, 180 * (TEST_NIGHTLY
? 2 : 1) * RANDOM_MULTIPLIER);
   }
   
   protected void waitForRecoveriesToFinish(String collection,
@@ -154,8 +154,17 @@ public abstract class AbstractDistribZkT
           if (verbose) System.out
           .println("Gave up waiting for recovery to finish..");
           if (failOnTimeout) {
-            fail("There are still nodes recoverying - waited for " + timeoutSeconds + " seconds");
+            Map<Thread,StackTraceElement[]> stackTraces = Thread.getAllStackTraces();
+            for (Map.Entry<Thread,StackTraceElement[]>  entry : stackTraces.entrySet())
{
+              System.out.println("");
+              System.out.println(entry.getKey().toString());
+              for (StackTraceElement st : entry.getValue()) {
+                System.out.println(st);
+              }
+            }
             printLayout();
+            fail("There are still nodes recoverying - waited for " + timeoutSeconds + " seconds");
+            // won't get here
             return;
           }
         }



Mime
View raw message