lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ans...@apache.org
Subject svn commit: r1629063 - in /lucene/dev/branches/branch_5x: ./ solr/ solr/core/ solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
Date Thu, 02 Oct 2014 20:32:09 GMT
Author: anshum
Date: Thu Oct  2 20:32:09 2014
New Revision: 1629063

URL: http://svn.apache.org/r1629063
Log:
SOLR-6564: Fix failing CloudExitableDirectoryReader test in Solr (merge from trunk r1629062)

Added:
    lucene/dev/branches/branch_5x/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml
      - copied unchanged from r1629062, lucene/dev/trunk/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog-with-delayingcomponent.xml
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java?rev=1629063&r1=1629062&r2=1629063&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
(original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/cloud/CloudExitableDirectoryReaderTest.java
Thu Oct  2 20:32:09 2014
@@ -18,6 +18,7 @@ package org.apache.solr.cloud;
 */
 
 
+import org.apache.lucene.util.LuceneTestCase.Slow;
 import org.apache.lucene.util.TestUtil;
 import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.response.QueryResponse;
@@ -31,12 +32,13 @@ import static org.apache.solr.common.Sol
 /**
 * Distributed test for {@link org.apache.lucene.index.ExitableDirectoryReader} 
 */
+@Slow
 public class CloudExitableDirectoryReaderTest extends AbstractFullDistribZkTestBase {
   public static Logger log = LoggerFactory.getLogger(CloudExitableDirectoryReaderTest.class);
-  private static final int NUM_DOCS_PER_TYPE = 2000;
+  private static final int NUM_DOCS_PER_TYPE = 20;
 
   public CloudExitableDirectoryReaderTest() {
-    configString = "solrconfig-tlog.xml";
+    configString = "solrconfig-tlog-with-delayingcomponent.xml";
     schemaString = "schema.xml";
   }
 
@@ -74,13 +76,19 @@ public class CloudExitableDirectoryReade
   public void doTimeoutTests() throws Exception {
     assertFail(params("q", "name:a*", "timeAllowed", "1"));
 
-    long oneSecond = 1000L; // query rewriting for NUM_DOCS_PER_TYPE terms should take less
time than this
-    Long timeAllowed = TestUtil.nextLong(random(), oneSecond, Long.MAX_VALUE);
+    /*
+    query rewriting for NUM_DOCS_PER_TYPE terms should take less 
+    time than this. Keeping it at 5 because the delaying search component delays all requests

+    by at 1 second.
+     */
+    long fiveSeconds = 5000L;
+    
+    Long timeAllowed = TestUtil.nextLong(random(), fiveSeconds, Long.MAX_VALUE);
     assertSuccess(params("q", "name:a*", "timeAllowed",timeAllowed.toString()));
 
     assertFail(params("q", "name:a*", "timeAllowed", "1"));
 
-    timeAllowed = TestUtil.nextLong(random(), oneSecond, Long.MAX_VALUE);
+    timeAllowed = TestUtil.nextLong(random(), fiveSeconds, Long.MAX_VALUE);
     assertSuccess(params("q", "name:b*", "timeAllowed",timeAllowed.toString()));
 
     timeAllowed = TestUtil.nextLong(random(), Long.MIN_VALUE, -1L);  // negative timeAllowed
should disable timeouts



Mime
View raw message