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
This commit is contained in:
Shalin Shekhar Mangar 2014-12-18 17:15:10 +00:00
parent 2950159a2c
commit 85ccfa8b22
1 changed files with 11 additions and 6 deletions

View File

@ -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");
}
}
}