use of io.druid.guice.ExtensionsConfig in project druid by druid-io.
the class InitializationTest method testGetHadoopDependencyFilesToLoad_wrong_type_root_hadoop_depenencies_dir.
@Test(expected = ISE.class)
public void testGetHadoopDependencyFilesToLoad_wrong_type_root_hadoop_depenencies_dir() throws IOException {
final File rootHadoopDependenciesDir = temporaryFolder.newFile();
final ExtensionsConfig config = new ExtensionsConfig() {
@Override
public String getHadoopDependenciesDir() {
return rootHadoopDependenciesDir.getAbsolutePath();
}
};
Initialization.getHadoopDependencyFilesToLoad(ImmutableList.<String>of(), config);
}
use of io.druid.guice.ExtensionsConfig in project druid by druid-io.
the class InitializationTest method testGetExtensionFilesToLoad_non_exist_extensions_dir.
@Test
public void testGetExtensionFilesToLoad_non_exist_extensions_dir() throws IOException {
final File tmpDir = temporaryFolder.newFolder();
Assert.assertTrue("could not create missing folder", !tmpDir.exists() || tmpDir.delete());
Assert.assertArrayEquals("Non-exist root extensionsDir should return an empty array of File", new File[] {}, Initialization.getExtensionFilesToLoad(new ExtensionsConfig() {
@Override
public String getDirectory() {
return tmpDir.getAbsolutePath();
}
}));
}
use of io.druid.guice.ExtensionsConfig in project druid by druid-io.
the class InitializationTest method testGetExtensionFilesToLoad_wrong_type_extensions_dir.
@Test(expected = ISE.class)
public void testGetExtensionFilesToLoad_wrong_type_extensions_dir() throws IOException {
final File extensionsDir = temporaryFolder.newFile();
final ExtensionsConfig config = new ExtensionsConfig() {
@Override
public String getDirectory() {
return extensionsDir.getAbsolutePath();
}
};
Initialization.getExtensionFilesToLoad(config);
}
Aggregations