fix test failure (#2818)

formatting changes
This commit is contained in:
Nishant 2016-04-15 10:10:19 +05:30 committed by Fangjin Yang
parent b534f7203c
commit 632b21472b
1 changed files with 9 additions and 10 deletions

View File

@ -194,7 +194,8 @@ public class InitializationTest
Assert.assertArrayEquals(
"Non-exist root extensionsDir should return an empty array of File",
new File[]{},
Initialization.getExtensionFilesToLoad(new ExtensionsConfig(){
Initialization.getExtensionFilesToLoad(new ExtensionsConfig()
{
@Override
public String getDirectory()
{
@ -414,17 +415,15 @@ public class InitializationTest
+ File.pathSeparator
+ tmpDir2.getAbsolutePath() + File.separator + "*";
List<URL> expected = ImmutableList.<URL>builder()
.add(tmpDir1a.toURI().toURL())
.add(tmpDir1b.toURI().toURL())
.add(tmpDir3.toURI().toURL())
.add(tmpDir2c.toURI().toURL())
.add(tmpDir2d.toURI().toURL())
.add(tmpDir2e.toURI().toURL())
.build();
// getURLsForClasspath uses listFiles which does NOT guarantee any ordering for the name strings.
List<URL> urLsForClasspath = Initialization.getURLsForClasspath(cp);
Assert.assertEquals(Sets.newHashSet(tmpDir1a.toURI().toURL(), tmpDir1b.toURI().toURL()),
Sets.newHashSet(urLsForClasspath.subList(0, 2)));
Assert.assertEquals(tmpDir3.toURI().toURL(), urLsForClasspath.get(2));
Assert.assertEquals(Sets.newHashSet(tmpDir2c.toURI().toURL(), tmpDir2d.toURI().toURL(), tmpDir2e.toURI().toURL()),
Sets.newHashSet(urLsForClasspath.subList(3, 6)));
Assert.assertEquals(expected, Initialization.getURLsForClasspath(cp));
}
public static class TestDruidModule implements DruidModule