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 2011/12/16 17:16:02 UTC
svn commit: r1215207 - in
/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud:
ChaosMonkey.java ChaosMonkeyDistributedZkTest.java FullDistributedZkTest.java
Author: markrmiller
Date: Fri Dec 16 16:16:02 2011
New Revision: 1215207
URL: http://svn.apache.org/viewvc?rev=1215207&view=rev
Log:
cleaner shutdown of jettys enforced in full distrib zk test tear down
Modified:
lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java
lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyDistributedZkTest.java
lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/FullDistributedZkTest.java
Modified: lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java?rev=1215207&r1=1215206&r2=1215207&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java Fri Dec 16 16:16:02 2011
@@ -71,7 +71,12 @@ public class ChaosMonkey {
return jetty;
}
- private void stopJetty(JettySolrRunner jetty) throws Exception {
+ public void stopJetty(JettySolrRunner jetty) throws Exception {
+ stop(jetty);
+ stops.incrementAndGet();
+ }
+
+ public static void stop(JettySolrRunner jetty) throws Exception {
// get a clean shutdown so that no dirs are left open...
FilterHolder fh = jetty.getDispatchFilter();
if (fh != null) {
@@ -82,7 +87,6 @@ public class ChaosMonkey {
}
jetty.stop();
- stops.incrementAndGet();
}
public void stopShard(String slice) throws Exception {
Modified: lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyDistributedZkTest.java?rev=1215207&r1=1215206&r2=1215207&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyDistributedZkTest.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/ChaosMonkeyDistributedZkTest.java Fri Dec 16 16:16:02 2011
@@ -57,7 +57,8 @@ public class ChaosMonkeyDistributedZkTes
indexThread.safeStop();
- Thread.sleep(8000);
+ // try and wait for any replications and what not to finish...
+ Thread.sleep(4000);
commit();
Modified: lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/FullDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/FullDistributedZkTest.java?rev=1215207&r1=1215206&r2=1215207&view=diff
==============================================================================
--- lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/FullDistributedZkTest.java (original)
+++ lucene/dev/branches/solrcloud/solr/core/src/test/org/apache/solr/cloud/FullDistributedZkTest.java Fri Dec 16 16:16:02 2011
@@ -968,4 +968,12 @@ public class FullDistributedZkTest exten
controlClient.commit();
cloudClient.commit();
}
+
+ protected void destroyServers() throws Exception {
+ ChaosMonkey.stop(controlJetty);
+ for (JettySolrRunner jetty : jettys) ChaosMonkey.stop(jetty);
+ clients.clear();
+ jettys.clear();
+ Thread.sleep(10000);
+ }
}