mirror of https://github.com/apache/lucene.git
audit clearing sys props
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1296855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
36126c9b1f
commit
726ac1883a
|
@ -24,10 +24,8 @@ import java.util.Map;
|
|||
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.common.cloud.SolrZkClient;
|
||||
import org.apache.solr.common.cloud.ZkCmdExecutor;
|
||||
import org.apache.solr.common.cloud.ZkNodeProps;
|
||||
import org.apache.solr.common.cloud.ZkStateReader;
|
||||
import org.apache.solr.core.SolrConfig;
|
||||
import org.apache.zookeeper.CreateMode;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.BeforeClass;
|
||||
|
@ -61,7 +59,7 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 {
|
|||
|
||||
System.setProperty("solrcloud.skip.autorecovery", "true");
|
||||
System.setProperty("zkHost", zkServer.getZkAddress());
|
||||
System.setProperty("hostPort", "0000");
|
||||
System.setProperty("jetty.port", "0000");
|
||||
|
||||
buildZooKeeper(zkServer.getZkHost(), zkServer.getZkAddress(),
|
||||
"solrconfig.xml", "schema.xml");
|
||||
|
@ -120,6 +118,8 @@ public abstract class AbstractZkTestCase extends SolrTestCaseJ4 {
|
|||
System.clearProperty("solr.test.sys.prop1");
|
||||
System.clearProperty("solr.test.sys.prop2");
|
||||
System.clearProperty("solrcloud.skip.autorecovery");
|
||||
System.clearProperty("jetty.port");
|
||||
|
||||
zkServer.shutdown();
|
||||
|
||||
// wait just a bit for any zk client threads to outlast timeout
|
||||
|
|
|
@ -271,6 +271,11 @@ public class LeaderElectionIntegrationTest extends SolrTestCaseJ4 {
|
|||
@AfterClass
|
||||
public static void afterClass() throws InterruptedException {
|
||||
System.clearProperty("solrcloud.skip.autorecovery");
|
||||
System.clearProperty("zkClientTimeout");
|
||||
System.clearProperty("zkHost");
|
||||
System.clearProperty("shard");
|
||||
System.clearProperty("solr.data.dir");
|
||||
System.clearProperty("solr.solr.home");
|
||||
resetExceptionIgnores();
|
||||
// wait just a bit for any zk client threads to outlast timeout
|
||||
Thread.sleep(2000);
|
||||
|
|
|
@ -98,7 +98,7 @@ public class NodeStateWatcherTest extends SolrTestCaseJ4 {
|
|||
waitForCall(4, callCounter);
|
||||
assertEquals(0, watcher.getCurrentState().size());
|
||||
} finally {
|
||||
|
||||
System.clearProperty(ZkStateReader.NUM_SHARDS_PROP);
|
||||
if (zkClient != null) {
|
||||
zkClient.close();
|
||||
}
|
||||
|
|
|
@ -237,6 +237,8 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
|||
assertNotNull(reader.getLeaderUrl("collection1", "shard3", 15000));
|
||||
|
||||
} finally {
|
||||
System.clearProperty(ZkStateReader.NUM_SHARDS_PROP);
|
||||
System.clearProperty("bootstrap_confdir");
|
||||
if (DEBUG) {
|
||||
if (zkController != null) {
|
||||
zkClient.printLayoutToStdOut();
|
||||
|
@ -250,8 +252,6 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
|||
}
|
||||
server.shutdown();
|
||||
}
|
||||
|
||||
System.clearProperty(ZkStateReader.NUM_SHARDS_PROP);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -394,6 +394,8 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
|||
}
|
||||
|
||||
} finally {
|
||||
System.clearProperty(ZkStateReader.NUM_SHARDS_PROP);
|
||||
System.clearProperty("bootstrap_confdir");
|
||||
if (DEBUG) {
|
||||
if (controllers[0] != null) {
|
||||
zkClient.printLayoutToStdOut();
|
||||
|
@ -414,8 +416,6 @@ public class OverseerTest extends SolrTestCaseJ4 {
|
|||
nodeExecutors[i].shutdownNow();
|
||||
}
|
||||
}
|
||||
|
||||
System.clearProperty(ZkStateReader.NUM_SHARDS_PROP);
|
||||
}
|
||||
|
||||
//wait until collections are available
|
||||
|
|
Loading…
Reference in New Issue