SOLR-4749: Fix a few issues.

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1470766 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-04-23 01:07:05 +00:00
parent 33abacf125
commit 7a70a0d6a3
3 changed files with 18 additions and 10 deletions

View File

@ -53,7 +53,7 @@ public class ConfigSolrXml extends ConfigSolr {
fillPropMap();
String coreRoot = get(CfgProp.SOLR_COREROOTDIRECTORY, container.getSolrHome());
String coreRoot = get(CfgProp.SOLR_COREROOTDIRECTORY, (container == null ? null : container.getSolrHome()));
coreDescriptorMap = solrCoreDiscoverer.discover(container, new File(coreRoot));
}

View File

@ -1,5 +1,22 @@
package org.apache.solr.core;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import java.io.File;
import java.util.ArrayList;
import java.util.Collection;
@ -105,9 +122,6 @@ class SolrCores {
CoreContainer.log.info("Core " + coreName + " moved from core container list before closing.");
} else {
try {
// nocommit: wtf is this?
// addPersistOneCore(cfg, container.loader, core.getCoreDescriptor(), getCoreToOrigName(core));
core.close();
} catch (Throwable t) {
SolrException.log(CoreContainer.log, "Error shutting down core", t);

View File

@ -109,7 +109,6 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
CoreContainer.Initializer init = new CoreContainer.Initializer();
final CoreContainer cores = init.initialize();
cores.setPersistent(false);
return cores;
}
@ -139,11 +138,6 @@ public class TestCoreDiscovery extends SolrTestCaseJ4 {
try {
assertNull("defaultCore no longer allowed in solr.xml", cc.getDefaultCoreName());
assertEquals("222.333.444.555", cc.zkSys.getHost());
assertEquals("6000", cc.zkSys.getHostPort());
assertEquals("solrprop", cc.zkSys.getHostContext());
assertEquals(20, cc.zkSys.getZkClientTimeout());
TestLazyCores.checkInCores(cc, "core1");
TestLazyCores.checkNotInCores(cc, "lazy1", "core2", "collection1");