You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/07/14 01:57:03 UTC
[lucene-solr] branch reference_impl updated: #128 - Knock these two
tests down.
This is an automated email from the ASF dual-hosted git repository.
markrmiller pushed a commit to branch reference_impl
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/reference_impl by this push:
new f6722c2 #128 - Knock these two tests down.
f6722c2 is described below
commit f6722c2b69318e9a35e3a613c36abd3b78a5734f
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 13 20:56:49 2020 -0500
#128 - Knock these two tests down.
---
.../org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java | 9 ++++++---
.../test/org/apache/solr/search/facet/RangeFacetCloudTest.java | 2 +-
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
index d5a34bd..961bd15 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestSolrConfigHandlerConcurrent.java
@@ -30,9 +30,11 @@ import java.util.concurrent.TimeUnit;
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.util.EntityUtils;
+import org.apache.lucene.util.LuceneTestCase;
import org.apache.solr.SolrTestCaseJ4;
import org.apache.solr.client.solrj.impl.CloudSolrClient;
import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
+import org.apache.solr.cloud.SolrCloudBridgeTestCase;
import org.apache.solr.common.LinkedHashMapWriter;
import org.apache.solr.common.MapWriter;
import org.apache.solr.common.cloud.DocCollection;
@@ -50,7 +52,7 @@ import org.slf4j.LoggerFactory;
import static java.util.Arrays.asList;
-public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBase {
+public class TestSolrConfigHandlerConcurrent extends SolrCloudBridgeTestCase {
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
@@ -73,6 +75,7 @@ public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBa
@Override
public Object call() {
try {
+ Thread.sleep(LuceneTestCase.random().nextInt(1000));
invokeBulkCall((String) e.getKey(), errs, value);
} catch (Exception e1) {
e1.printStackTrace();
@@ -82,7 +85,7 @@ public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBa
};
threads.add(t);
if (!TEST_NIGHTLY) {
- if (threads.size() > 10) {
+ if (threads.size() > 5) {
break;
}
}
@@ -118,7 +121,7 @@ public class TestSolrConfigHandlerConcurrent extends AbstractFullDistribZkTestBa
Set<String> errmessages = new HashSet<>();
for(int i =1;i<2;i++){//make it ahigher number
- RestTestHarness publisher = randomRestTestHarness(r);
+ RestTestHarness publisher = randomRestTestHarness(random());
String response;
String val1;
String val2;
diff --git a/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java b/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
index 622b220..8700ab2 100644
--- a/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
+++ b/solr/core/src/test/org/apache/solr/search/facet/RangeFacetCloudTest.java
@@ -99,7 +99,7 @@ public class RangeFacetCloudTest extends SolrCloudTestCase {
cluster.getSolrClient().setDefaultCollection(COLLECTION);
final int numDocs = atLeast(TEST_NIGHTLY ? 1000 : 100);
- final int maxTermId = atLeast(TERM_VALUES_RANDOMIZER);
+ final int maxTermId = atLeast(TEST_NIGHTLY ? TERM_VALUES_RANDOMIZER : 10);
// clear the RANGE_MODEL
Arrays.fill(RANGE_MODEL, 0);