From 85ccfa8b2226db8ec5a64ae60bf47201fd16d71a Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Thu, 18 Dec 2014 17:15:10 +0000 Subject: [PATCH] Compare canonical paths instead of absolute paths git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1646492 13f79535-47bb-0310-9956-ffa450edef68 --- .../cloud/CollectionsAPIDistributedZkTest.java | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java index bd67307a3ac..db2e24aa9d2 100644 --- a/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/CollectionsAPIDistributedZkTest.java @@ -1131,12 +1131,17 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa new File((String) core.getStatistics().get("instanceDir"), "core.properties").exists()); } - - assertEquals( - new File(SolrResourceLoader.normalizeDir(jetty.getSolrHome() + File.separator - + core.getName())).getAbsolutePath(), - new File(SolrResourceLoader.normalizeDir((String) core.getStatistics().get( - "instanceDir"))).getAbsolutePath()); + + try { + assertEquals( + new File(SolrResourceLoader.normalizeDir(jetty.getSolrHome() + File.separator + + core.getName())).getCanonicalPath(), + new File(SolrResourceLoader.normalizeDir((String) core.getStatistics().get( + "instanceDir"))).getCanonicalPath()); + } catch (IOException e) { + log.error("Failed to get canonical path", e); + fail("Failed to get canonical path"); + } } }