mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fix test
This commit is contained in:
parent
864bea1402
commit
1f1a3b5c48
2 changed files with 6 additions and 16 deletions
|
|
@ -63,11 +63,11 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
confDir.mkdirs();
|
||||
notebookDir = new File(tmpDir + "/notebook");
|
||||
notebookDir.mkdirs();
|
||||
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), confDir.getAbsolutePath());
|
||||
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(), tmpDir.getAbsolutePath() + "/conf");
|
||||
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_NOTEBOOK_DIR.getVarName(), notebookDir.getAbsolutePath());
|
||||
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_INTERPRETERS.getVarName(), "org.apache.zeppelin.interpreter.mock.MockInterpreter1,org.apache.zeppelin.interpreter.mock.MockInterpreter2");
|
||||
|
||||
conf = ZeppelinConfiguration.create();
|
||||
conf = new ZeppelinConfiguration();
|
||||
|
||||
this.schedulerFactory = new SchedulerFactory();
|
||||
|
||||
|
|
@ -104,6 +104,8 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
@After
|
||||
public void tearDown() throws Exception {
|
||||
FileUtils.deleteDirectory(tmpDir);
|
||||
System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getVarName(),
|
||||
ZeppelinConfiguration.ConfVars.ZEPPELIN_CONF_DIR.getStringValue());
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import java.util.LinkedList;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang.NullArgumentException;
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration;
|
||||
import org.apache.zeppelin.conf.ZeppelinConfiguration.ConfVars;
|
||||
|
|
@ -67,20 +68,7 @@ public class InterpreterFactoryTest {
|
|||
|
||||
@After
|
||||
public void tearDown() throws Exception {
|
||||
delete(tmpDir);
|
||||
}
|
||||
|
||||
private void delete(File file){
|
||||
if(file.isFile()) file.delete();
|
||||
else if(file.isDirectory()){
|
||||
File [] files = file.listFiles();
|
||||
if(files!=null && files.length>0){
|
||||
for(File f : files){
|
||||
delete(f);
|
||||
}
|
||||
}
|
||||
file.delete();
|
||||
}
|
||||
FileUtils.deleteDirectory(tmpDir);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
|||
Loading…
Reference in a new issue