Skip to content

Commit ed558be

Browse files
committed
Fixed some tests after rebase
1 parent fa7fccb commit ed558be

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/NotebookTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ public void testCloneNote() throws IOException, CloneNotSupportedException,
450450
public void testCloneNoteWithNoName() throws IOException, CloneNotSupportedException,
451451
InterruptedException {
452452
Note note = notebook.createNote(null);
453-
factory.setInterpreters(note.getId(), factory.getDefaultInterpreterSettingList());
453+
factory.setInterpreters(anonymous.getUser(), note.getId(), factory.getDefaultInterpreterSettingList());
454454

455455
Note cloneNote = notebook.cloneNote(note.getId(), null, null);
456456
assertEquals(cloneNote.getName(), "Note " + cloneNote.getId());

zeppelin-zengine/src/test/java/org/apache/zeppelin/notebook/ParagraphTest.java

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -73,32 +73,6 @@ public void replNameEndsWithWhitespace() {
7373
assertEquals("md", Paragraph.getRequiredReplName(text));
7474
}
7575

76-
@Test
77-
public void effectiveTextTest() {
78-
InterpreterFactory interpreterFactory = mock(InterpreterFactory.class);
79-
Interpreter interpreter = mock(Interpreter.class);
80-
Note note = mock(Note.class);
81-
82-
Paragraph p = new Paragraph("paragraph", note, null, interpreterFactory);
83-
p.setText("%h2 show databases");
84-
p.setEffectiveText("%jdbc(h2) show databases");
85-
assertEquals("Get right replName", "jdbc", p.getRequiredReplName());
86-
assertEquals("Get right scriptBody", "(h2) show databases", p.getScriptBody());
87-
88-
when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("jdbc"))).thenReturn(interpreter);
89-
when(interpreter.getFormType()).thenReturn(Interpreter.FormType.NATIVE);
90-
when(note.getId()).thenReturn("noteId");
91-
92-
try {
93-
p.jobRun();
94-
} catch (Throwable throwable) {
95-
// Do nothing
96-
}
97-
98-
assertEquals("Erase effective Text", "h2", p.getRequiredReplName());
99-
assertEquals("Erase effective Text", "show databases", p.getScriptBody());
100-
}
101-
10276
@Test
10377
public void should_extract_variable_from_angular_object_registry() throws Exception {
10478
//Given

0 commit comments

Comments
 (0)