lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject svn commit: r1608128 - in /lucene/dev/branches/branch_4x: ./ solr/ solr/core/ solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
Date Sat, 05 Jul 2014 20:22:11 GMT
Author: shalin
Date: Sat Jul  5 20:22:10 2014
New Revision: 1608128

URL: http://svn.apache.org/r1608128
Log:
Increase timeout to 90 seconds to make it pass on slow jenkins machine

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/solr/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/   (props changed)
    lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java

Modified: lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java?rev=1608128&r1=1608127&r2=1608128&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
(original)
+++ lucene/dev/branches/branch_4x/solr/core/src/test/org/apache/solr/cloud/MultiThreadedOCPTest.java
Sat Jul  5 20:22:10 2014
@@ -40,6 +40,7 @@ import java.util.Random;
  */
 public class MultiThreadedOCPTest extends AbstractFullDistribZkTestBase {
 
+  private static final int REQUEST_STATUS_TIMEOUT = 90;
   private static Logger log = LoggerFactory
       .getLogger(MultiThreadedOCPTest.class);
 
@@ -98,7 +99,7 @@ public class MultiThreadedOCPTest extend
     }
     assertTrue("More than one tasks were supposed to be running in parallel but they weren't.",
pass);
     for(int i=1;i<=NUM_COLLECTIONS;i++) {
-      String state = getRequestStateAfterCompletion(i + "", 30, server);
+      String state = getRequestStateAfterCompletion(i + "", REQUEST_STATUS_TIMEOUT, server);
       assertTrue("Task " + i + " did not complete, final state: " + state,state.equals("completed"));
     }
   }
@@ -127,7 +128,7 @@ public class MultiThreadedOCPTest extend
       
       assertTrue("Mutual exclusion failed. Found more than one task running for the same
collection", runningTasks < 2);
 
-      if(completedTasks == 2 || iterations++ > 90)
+      if(completedTasks == 2 || iterations++ > REQUEST_STATUS_TIMEOUT)
         break;
 
       try {
@@ -138,7 +139,7 @@ public class MultiThreadedOCPTest extend
       }
     }
     for (int i=1001;i<=1002;i++) {
-      String state = getRequestStateAfterCompletion(i + "", 30, server);
+      String state = getRequestStateAfterCompletion(i + "", REQUEST_STATUS_TIMEOUT, server);
       assertTrue("Task " + i + " did not complete, final state: " + state,state.equals("completed"));
     }
   }
@@ -157,7 +158,7 @@ public class MultiThreadedOCPTest extend
         "Task with the same requestid already exists.", r.get("error"));
 
     for (int i=3001;i<=3002;i++) {
-      String state = getRequestStateAfterCompletion(i + "", 30, server);
+      String state = getRequestStateAfterCompletion(i + "", REQUEST_STATUS_TIMEOUT, server);
       assertTrue("Task " + i + " did not complete, final state: " + state,state.equals("completed"));
     }
   }



Mime
View raw message