mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fixed test after rebase
This commit is contained in:
parent
cb66946f92
commit
510942b50b
4 changed files with 8 additions and 5 deletions
|
|
@ -788,6 +788,8 @@ public class NotebookServer extends WebSocketServlet implements
|
|||
AuthenticationInfo subject = null;
|
||||
if (fromMessage.principal != null) {
|
||||
subject = new AuthenticationInfo(fromMessage.principal);
|
||||
} else {
|
||||
subject = new AuthenticationInfo("anonymous");
|
||||
}
|
||||
note = notebook.importNote(noteJson, noteName, subject);
|
||||
note.persist(subject);
|
||||
|
|
|
|||
|
|
@ -586,6 +586,7 @@ public class Paragraph extends Job implements Serializable, Cloneable {
|
|||
}
|
||||
|
||||
private boolean isValidInterpreter(String replName) {
|
||||
return factory.getInterpreter(note.getId(), replName) != null;
|
||||
return factory.getInterpreter("",
|
||||
note.getId(), replName) != null;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -141,8 +141,8 @@ public class InterpreterFactoryTest {
|
|||
break;
|
||||
}
|
||||
}
|
||||
InterpreterGroup interpreterGroup = mock1Setting.getInterpreterGroup("sharedProcess");
|
||||
factory.createInterpretersForNote(mock1Setting, "sharedProcess", "session");
|
||||
InterpreterGroup interpreterGroup = mock1Setting.getInterpreterGroup("user", "sharedProcess");
|
||||
factory.createInterpretersForNote(mock1Setting, "user", "sharedProcess", "session");
|
||||
// get interpreter
|
||||
assertNotNull("get Interpreter", interpreterGroup.get("session").get(0));
|
||||
assertTrue(interpreterGroup.get("session").get(0) instanceof LazyOpenInterpreter);
|
||||
|
|
|
|||
|
|
@ -103,7 +103,7 @@ public class NoteTest {
|
|||
|
||||
@Test
|
||||
public void insertParagraphWithLastReplNameTest() {
|
||||
when(interpreterFactory.getInterpreter(anyString(), eq("spark"))).thenReturn(interpreter);
|
||||
when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("spark"))).thenReturn(interpreter);
|
||||
|
||||
Note note = new Note(repo, interpreterFactory, jobListenerFactory, index, credentials, noteEventListener);
|
||||
Paragraph p1 = note.addParagraph();
|
||||
|
|
@ -115,7 +115,7 @@ public class NoteTest {
|
|||
|
||||
@Test
|
||||
public void insertParagraphWithInvalidReplNameTest() {
|
||||
when(interpreterFactory.getInterpreter(anyString(), eq("invalid"))).thenReturn(null);
|
||||
when(interpreterFactory.getInterpreter(anyString(), anyString(), eq("invalid"))).thenReturn(null);
|
||||
|
||||
Note note = new Note(repo, interpreterFactory, jobListenerFactory, index, credentials, noteEventListener);
|
||||
Paragraph p1 = note.addParagraph();
|
||||
|
|
|
|||
Loading…
Reference in a new issue