mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fixed some tests after rebase
This commit is contained in:
parent
fa7fccb9d7
commit
ed558be78b
2 changed files with 1 additions and 27 deletions
|
|
@ -450,7 +450,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
public void testCloneNoteWithNoName() throws IOException, CloneNotSupportedException,
|
||||
InterruptedException {
|
||||
Note note = notebook.createNote(null);
|
||||
factory.setInterpreters(note.getId(), factory.getDefaultInterpreterSettingList());
|
||||
factory.setInterpreters(anonymous.getUser(), note.getId(), factory.getDefaultInterpreterSettingList());
|
||||
|
||||
Note cloneNote = notebook.cloneNote(note.getId(), null, null);
|
||||
assertEquals(cloneNote.getName(), "Note " + cloneNote.getId());
|
||||
|
|
|
|||
|
|
@ -73,32 +73,6 @@ public class ParagraphTest {
|
|||
assertEquals("md", Paragraph.getRequiredReplName(text));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void effectiveTextTest() {
|
||||
InterpreterFactory interpreterFactory = mock(InterpreterFactory.class);
|
||||
Interpreter interpreter = mock(Interpreter.class);
|
||||
Note note = mock(Note.class);
|
||||
|
||||
Paragraph p = new Paragraph("paragraph", note, null, interpreterFactory);
|
||||
p.setText("%h2 show databases");
|
||||
p.setEffectiveText("%jdbc(h2) show databases");
|
||||
assertEquals("Get right replName", "jdbc", p.getRequiredReplName());
|
||||
assertEquals("Get right scriptBody", "(h2) show databases", p.getScriptBody());
|
||||
|
||||
when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("jdbc"))).thenReturn(interpreter);
|
||||
when(interpreter.getFormType()).thenReturn(Interpreter.FormType.NATIVE);
|
||||
when(note.getId()).thenReturn("noteId");
|
||||
|
||||
try {
|
||||
p.jobRun();
|
||||
} catch (Throwable throwable) {
|
||||
// Do nothing
|
||||
}
|
||||
|
||||
assertEquals("Erase effective Text", "h2", p.getRequiredReplName());
|
||||
assertEquals("Erase effective Text", "show databases", p.getScriptBody());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void should_extract_variable_from_angular_object_registry() throws Exception {
|
||||
//Given
|
||||
|
|
|
|||
Loading…
Reference in a new issue