From 04fd728416b45ccd6af352da8317af3aa285d295 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sun, 24 Nov 2013 15:00:48 +0000 Subject: [PATCH] tests: fix for random map order git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1544984 13f79535-47bb-0310-9956-ffa450edef68 --- .../solr/core/TestSolrXmlPersistor.java | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java b/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java index d1b7d3cf117..4878c6b161e 100644 --- a/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java +++ b/solr/core/src/test/org/apache/solr/core/TestSolrXmlPersistor.java @@ -17,17 +17,15 @@ package org.apache.solr.core; * 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.IOException; import java.util.List; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import org.apache.commons.io.FileUtils; +import org.apache.solr.SolrTestCaseJ4; +import org.junit.Test; + +import com.google.common.collect.ImmutableList; public class TestSolrXmlPersistor extends SolrTestCaseJ4 { @@ -78,10 +76,12 @@ public class TestSolrXmlPersistor extends SolrTestCaseJ4 { List cds = ImmutableList.of(cd); SolrXMLCoresLocator persistor = new SolrXMLCoresLocator(solrxml, null); - assertEquals(persistor.buildSolrXML(cds), - "" + SolrXMLCoresLocator.NEWLINE - + " " + SolrXMLCoresLocator.NEWLINE - + ""); + String xml = persistor.buildSolrXML(cds); + + assertTrue(xml.contains("")); + assertTrue(xml.contains("name=\"testcore\"")); + assertTrue(xml.contains("instanceDir=\"instance/dir/\"")); + assertTrue(xml.contains("")); } finally { if (solrHomeDirectory.exists()) { FileUtils.deleteDirectory(solrHomeDirectory);