mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
update test
This commit is contained in:
parent
d43ab574bb
commit
04670776c6
3 changed files with 15 additions and 15 deletions
|
|
@ -134,7 +134,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
HeliumTestApplication.class.getName(),
|
||||
new String[][]{});
|
||||
|
||||
Note note1 = notebook.createNote();
|
||||
Note note1 = notebook.createNote(null);
|
||||
note1.getNoteReplLoader().setInterpreters(factory.getDefaultInterpreterSettingList());
|
||||
|
||||
Paragraph p1 = note1.addParagraph();
|
||||
|
|
@ -165,7 +165,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
|
||||
// clean
|
||||
heliumAppFactory.unload(p1, appId);
|
||||
notebook.removeNote(note1.getId());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -178,7 +178,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
HeliumTestApplication.class.getName(),
|
||||
new String[][]{});
|
||||
|
||||
Note note1 = notebook.createNote();
|
||||
Note note1 = notebook.createNote(null);
|
||||
note1.getNoteReplLoader().setInterpreters(factory.getDefaultInterpreterSettingList());
|
||||
|
||||
Paragraph p1 = note1.addParagraph();
|
||||
|
|
@ -202,7 +202,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
assertEquals(ApplicationState.Status.UNLOADED, app.getStatus());
|
||||
|
||||
// clean
|
||||
notebook.removeNote(note1.getId());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -216,7 +216,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
HeliumTestApplication.class.getName(),
|
||||
new String[][]{});
|
||||
|
||||
Note note1 = notebook.createNote();
|
||||
Note note1 = notebook.createNote(null);
|
||||
notebook.bindInterpretersToNote(note1.id(), factory.getDefaultInterpreterSettingList());
|
||||
|
||||
Paragraph p1 = note1.addParagraph();
|
||||
|
|
@ -240,7 +240,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
assertEquals(ApplicationState.Status.UNLOADED, app.getStatus());
|
||||
|
||||
// clean
|
||||
notebook.removeNote(note1.getId());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -254,7 +254,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
HeliumTestApplication.class.getName(),
|
||||
new String[][]{});
|
||||
|
||||
Note note1 = notebook.createNote();
|
||||
Note note1 = notebook.createNote(null);
|
||||
notebook.bindInterpretersToNote(note1.id(), factory.getDefaultInterpreterSettingList());
|
||||
|
||||
Paragraph p1 = note1.addParagraph();
|
||||
|
|
@ -286,7 +286,7 @@ public class HeliumApplicationFactoryTest implements JobListenerFactory {
|
|||
assertEquals(ApplicationState.Status.UNLOADED, app.getStatus());
|
||||
|
||||
// clean
|
||||
notebook.removeNote(note1.getId());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ public class NoteTest {
|
|||
when(replLoader.getDefaultInterpreterSetting())
|
||||
.thenReturn(Optional.<InterpreterSetting>absent());
|
||||
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
|
||||
note.putDefaultReplName();
|
||||
|
||||
assertEquals(StringUtils.EMPTY, note.getLastReplName());
|
||||
|
|
@ -119,7 +119,7 @@ public class NoteTest {
|
|||
when(replLoader.getDefaultInterpreterSetting())
|
||||
.thenReturn(Optional.of(interpreterSetting));
|
||||
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
|
||||
note.putDefaultReplName();
|
||||
|
||||
assertEquals("spark", note.getLastReplName());
|
||||
|
|
@ -133,7 +133,7 @@ public class NoteTest {
|
|||
when(replLoader.getDefaultInterpreterSetting())
|
||||
.thenReturn(Optional.of(interpreterSetting));
|
||||
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
|
||||
note.putDefaultReplName(); //set lastReplName
|
||||
|
||||
Paragraph p = note.addParagraph();
|
||||
|
|
@ -148,7 +148,7 @@ public class NoteTest {
|
|||
when(replLoader.getDefaultInterpreterSetting())
|
||||
.thenReturn(Optional.of(interpreterSetting));
|
||||
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials);
|
||||
Note note = new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener);
|
||||
note.putDefaultReplName(); //set lastReplName
|
||||
|
||||
Paragraph p = note.insertParagraph(note.getParagraphs().size());
|
||||
|
|
@ -159,7 +159,7 @@ public class NoteTest {
|
|||
@Test
|
||||
public void setLastReplName() {
|
||||
String paragraphId = "HelloWorld";
|
||||
Note note = Mockito.spy(new Note(repo, replLoader, jobListenerFactory, index, credentials));
|
||||
Note note = Mockito.spy(new Note(repo, replLoader, jobListenerFactory, index, credentials, noteEventListener));
|
||||
Paragraph mockParagraph = Mockito.mock(Paragraph.class);
|
||||
when(note.getParagraph(paragraphId)).thenReturn(mockParagraph);
|
||||
when(mockParagraph.getRequiredReplName()).thenReturn("spark");
|
||||
|
|
|
|||
|
|
@ -690,7 +690,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
}
|
||||
});
|
||||
|
||||
Note note1 = notebook.createNote();
|
||||
Note note1 = notebook.createNote(null);
|
||||
assertEquals(1, onNoteCreate.get());
|
||||
|
||||
Paragraph p1 = note1.addParagraph();
|
||||
|
|
@ -706,7 +706,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
notebook.bindInterpretersToNote(note1.id(), new LinkedList<String>());
|
||||
assertEquals(settings.size(), unbindInterpreter.get());
|
||||
|
||||
notebook.removeNote(note1.getId());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
assertEquals(1, onNoteRemove.get());
|
||||
assertEquals(1, onParagraphRemove.get());
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue