You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2019/05/25 15:44:08 UTC
[lucene-solr] branch master updated: Fix TestCloudSearcherWarming
to work around SOLR-13490
This is an automated email from the ASF dual-hosted git repository.
hossman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/master by this push:
new af4e1d3 Fix TestCloudSearcherWarming to work around SOLR-13490
af4e1d3 is described below
commit af4e1d324a389bac8cfcbffcbef20d4647957a61
Author: Chris Hostetter <ho...@apache.org>
AuthorDate: Sat May 25 08:40:04 2019 -0700
Fix TestCloudSearcherWarming to work around SOLR-13490
Also clean up some crufty System.out/System.err pollution
---
.../test/org/apache/solr/cloud/TestCloudSearcherWarming.java | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
index 24927e0..7376a73 100644
--- a/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
+++ b/solr/core/src/test/org/apache/solr/cloud/TestCloudSearcherWarming.java
@@ -114,9 +114,12 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
JettySolrRunner runner = cluster.getJettySolrRunner(0);
runner.stop();
- waitForState("jetty count:" + cluster.getJettySolrRunners().size(), collectionName, clusterShape(1, 0));
cluster.waitForJettyToStop(runner);
+ // check waitForState only after we are sure the node has shutdown and have forced an update to liveNodes
+ // ie: workaround SOLR-13490
+ cluster.getSolrClient().getZkStateReader().updateLiveNodes();
+ waitForState("jetty count:" + cluster.getJettySolrRunners().size(), collectionName, clusterShape(1, 0));
// restart
sleepTime.set(1000);
@@ -302,8 +305,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
public static class SleepingSolrEventListener implements SolrEventListener {
@Override
public void init(NamedList args) {
- new RuntimeException().printStackTrace();
- System.out.println(args);
+ // No-Op
}
@Override
@@ -325,7 +327,7 @@ public class TestCloudSearcherWarming extends SolrCloudTestCase {
try {
Thread.sleep(sleepTime.get());
} catch (InterruptedException e) {
- e.printStackTrace();
+ log.warn("newSearcher was interupdated", e);
}
log.info("Finished sleeping for {} on newSearcher: {}, currentSearcher: {} belonging to (newest) core: {}, id: {}", sleepTime.get(), newSearcher, currentSearcher, newSearcher.getCore().getName(), newSearcher.getCore());
}