mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
update interpreter module test
This commit is contained in:
parent
1d1638c27e
commit
6dd981a036
2 changed files with 20 additions and 16 deletions
|
|
@ -41,11 +41,11 @@ import org.slf4j.LoggerFactory;
|
|||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||
public class SparkInterpreterTest {
|
||||
public static SparkInterpreter repl;
|
||||
public static InterpreterGroup intpGroup;
|
||||
private InterpreterContext context;
|
||||
private File tmpDir;
|
||||
public static Logger LOGGER = LoggerFactory.getLogger(SparkInterpreterTest.class);
|
||||
|
||||
|
||||
/**
|
||||
* Get spark version number as a numerical value.
|
||||
* eg. 1.1.x => 11, 1.2.x => 12, 1.3.x => 13 ...
|
||||
|
|
@ -69,29 +69,29 @@ public class SparkInterpreterTest {
|
|||
|
||||
if (repl == null) {
|
||||
Properties p = new Properties();
|
||||
|
||||
intpGroup = new InterpreterGroup();
|
||||
repl = new SparkInterpreter(p);
|
||||
repl.setInterpreterGroup(intpGroup);
|
||||
repl.open();
|
||||
}
|
||||
|
||||
InterpreterGroup intpGroup = new InterpreterGroup();
|
||||
context = new InterpreterContext("note", "id", "title", "text",
|
||||
new HashMap<String, Object>(),
|
||||
new GUI(),
|
||||
new AngularObjectRegistry(intpGroup.getId(), null),
|
||||
null,
|
||||
new LinkedList<InterpreterContextRunner>(),
|
||||
new InterpreterOutput(new InterpreterOutputListener() {
|
||||
@Override
|
||||
public void onAppend(InterpreterOutput out, byte[] line) {
|
||||
new HashMap<String, Object>(),
|
||||
new GUI(),
|
||||
new AngularObjectRegistry(intpGroup.getId(), null),
|
||||
null,
|
||||
new LinkedList<InterpreterContextRunner>(),
|
||||
new InterpreterOutput(new InterpreterOutputListener() {
|
||||
@Override
|
||||
public void onAppend(InterpreterOutput out, byte[] line) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate(InterpreterOutput out, byte[] output) {
|
||||
@Override
|
||||
public void onUpdate(InterpreterOutput out, byte[] output) {
|
||||
|
||||
}
|
||||
}));
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@After
|
||||
|
|
|
|||
|
|
@ -51,10 +51,14 @@ public class SparkSqlInterpreterTest {
|
|||
|
||||
if (SparkInterpreterTest.repl == null) {
|
||||
repl = new SparkInterpreter(p);
|
||||
intpGroup = new InterpreterGroup();
|
||||
repl.setInterpreterGroup(intpGroup);
|
||||
repl.open();
|
||||
SparkInterpreterTest.repl = repl;
|
||||
SparkInterpreterTest.intpGroup = intpGroup;
|
||||
} else {
|
||||
repl = SparkInterpreterTest.repl;
|
||||
intpGroup = SparkInterpreterTest.intpGroup;
|
||||
}
|
||||
|
||||
sql = new SparkSqlInterpreter(p);
|
||||
|
|
|
|||
Loading…
Reference in a new issue