mirror of https://github.com/apache/lucene.git
Fix test bug on Windows
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1601893 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a27d245888
commit
9e91ecf59f
|
@ -54,11 +54,15 @@ public class TestConfigSets extends SolrTestCaseJ4 {
|
|||
|
||||
@Test
|
||||
public void testDefaultConfigSetBasePathResolution() throws IOException {
|
||||
try (SolrResourceLoader loader = new SolrResourceLoader("/path/to/solr/home")) {
|
||||
try (SolrResourceLoader loader = new SolrResourceLoader(new File("/path/to/solr/home").getAbsolutePath())) {
|
||||
|
||||
ConfigSetService.Default relativeCSS = new ConfigSetService.Default(loader, "configsets");
|
||||
assertThat(relativeCSS.getConfigSetBase().getAbsolutePath(), is("/path/to/solr/home/configsets"));
|
||||
ConfigSetService.Default absoluteCSS = new ConfigSetService.Default(loader, "/path/to/configsets");
|
||||
assertThat(absoluteCSS.getConfigSetBase().getAbsolutePath(), is("/path/to/configsets"));
|
||||
assertThat(relativeCSS.getConfigSetBase().getAbsoluteFile(),
|
||||
is(new File("/path/to/solr/home/configsets").getAbsoluteFile()));
|
||||
|
||||
ConfigSetService.Default absoluteCSS = new ConfigSetService.Default(loader, new File("/path/to/configsets").getAbsolutePath());
|
||||
assertThat(absoluteCSS.getConfigSetBase().getAbsoluteFile(),
|
||||
is(new File("/path/to/configsets").getAbsoluteFile()));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue