mirror of https://github.com/apache/lucene.git
tests: fix for random map order
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1544984 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
633ea330fe
commit
04fd728416
|
@ -17,17 +17,15 @@ package org.apache.solr.core;
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
|
||||||
import org.apache.commons.io.FileUtils;
|
|
||||||
import org.apache.solr.SolrTestCaseJ4;
|
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import org.apache.commons.io.FileUtils;
|
||||||
import static org.junit.Assert.assertTrue;
|
import org.apache.solr.SolrTestCaseJ4;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import com.google.common.collect.ImmutableList;
|
||||||
|
|
||||||
public class TestSolrXmlPersistor extends SolrTestCaseJ4 {
|
public class TestSolrXmlPersistor extends SolrTestCaseJ4 {
|
||||||
|
|
||||||
|
@ -78,10 +76,12 @@ public class TestSolrXmlPersistor extends SolrTestCaseJ4 {
|
||||||
List<CoreDescriptor> cds = ImmutableList.of(cd);
|
List<CoreDescriptor> cds = ImmutableList.of(cd);
|
||||||
|
|
||||||
SolrXMLCoresLocator persistor = new SolrXMLCoresLocator(solrxml, null);
|
SolrXMLCoresLocator persistor = new SolrXMLCoresLocator(solrxml, null);
|
||||||
assertEquals(persistor.buildSolrXML(cds),
|
String xml = persistor.buildSolrXML(cds);
|
||||||
"<solr><cores>" + SolrXMLCoresLocator.NEWLINE
|
|
||||||
+ " <core name=\"testcore\" instanceDir=\"instance/dir/\"/>" + SolrXMLCoresLocator.NEWLINE
|
assertTrue(xml.contains("<solr><cores>"));
|
||||||
+ "</cores></solr>");
|
assertTrue(xml.contains("name=\"testcore\""));
|
||||||
|
assertTrue(xml.contains("instanceDir=\"instance/dir/\""));
|
||||||
|
assertTrue(xml.contains("</cores></solr>"));
|
||||||
} finally {
|
} finally {
|
||||||
if (solrHomeDirectory.exists()) {
|
if (solrHomeDirectory.exists()) {
|
||||||
FileUtils.deleteDirectory(solrHomeDirectory);
|
FileUtils.deleteDirectory(solrHomeDirectory);
|
||||||
|
|
Loading…
Reference in New Issue