mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Fixed ZEPPELIN-1542
This commit is contained in:
parent
ad80951c5b
commit
e84703d4ef
1 changed files with 20 additions and 20 deletions
|
|
@ -129,7 +129,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
note.run(p2.getId());
|
||||
while(p2.isTerminated()==false || p2.getResult()==null) Thread.yield();
|
||||
assertEquals("repl2: hello world", p2.getResult().message());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -213,7 +213,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
new InterpreterFactory(conf, null, null, null, depResolver, false), this, null, null, null);
|
||||
|
||||
assertEquals(1, notebook2.getAllNotes().size());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -226,7 +226,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
Set<String> owners = new HashSet<>();
|
||||
owners.add("user1");
|
||||
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(note.getId()));
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -246,7 +246,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
// clear paragraph output/result
|
||||
note.clearParagraphOutput(p1.getId());
|
||||
assertNull(p1.getResult());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -317,7 +317,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
assertNotNull(dateFinished);
|
||||
Thread.sleep(1 * 1000);
|
||||
assertEquals(dateFinished, p.getDateFinished());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -370,7 +370,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
// make sure all paragraph has been executed
|
||||
assertNotNull(p.getDateFinished());
|
||||
assertNotNull(p2.getDateFinished());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -407,9 +407,9 @@ public class NotebookTest implements JobListenerFactory{
|
|||
Set<String> owners = new HashSet<>();
|
||||
owners.add("user1");
|
||||
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(importedNote2.getId()));
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(importedNote.getId(), null);
|
||||
notebook.removeNote(importedNote2.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
notebook.removeNote(importedNote.getId(), anonymous);
|
||||
notebook.removeNote(importedNote2.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -441,9 +441,9 @@ public class NotebookTest implements JobListenerFactory{
|
|||
Set<String> owners = new HashSet<>();
|
||||
owners.add("user1");
|
||||
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(cloneNote2.getId()));
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(cloneNote.getId(), null);
|
||||
notebook.removeNote(cloneNote2.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
notebook.removeNote(cloneNote.getId(), anonymous);
|
||||
notebook.removeNote(cloneNote2.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -454,8 +454,8 @@ public class NotebookTest implements JobListenerFactory{
|
|||
|
||||
Note cloneNote = notebook.cloneNote(note.getId(), null, anonymous);
|
||||
assertEquals(cloneNote.getName(), "Note " + cloneNote.getId());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(cloneNote.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
notebook.removeNote(cloneNote.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -480,8 +480,8 @@ public class NotebookTest implements JobListenerFactory{
|
|||
assertEquals(cp.getId(), p.getId());
|
||||
assertEquals(cp.text, p.text);
|
||||
assertNull(cp.getResult());
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(cloneNote.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
notebook.removeNote(cloneNote.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -575,7 +575,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
// notebook scope and global object sould be remained
|
||||
assertNotNull(registry.get("o2", note.getId(), null));
|
||||
assertNotNull(registry.get("o3", null, null));
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -685,7 +685,7 @@ public class NotebookTest implements JobListenerFactory{
|
|||
}
|
||||
|
||||
assertTrue(isAborted);
|
||||
notebook.removeNote(note.getId(), null);
|
||||
notebook.removeNote(note.getId(), anonymous);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
@ -899,8 +899,8 @@ public class NotebookTest implements JobListenerFactory{
|
|||
assertEquals(0, notebook.getAllNotes(anonymous).size());
|
||||
assertEquals(1, notebook.getAllNotes(new AuthenticationInfo("user1")).size());
|
||||
assertEquals(1, notebook.getAllNotes(new AuthenticationInfo("user2")).size());
|
||||
notebook.removeNote(note1.getId(), null);
|
||||
notebook.removeNote(note2.getId(), null);
|
||||
notebook.removeNote(note1.getId(), anonymous);
|
||||
notebook.removeNote(note2.getId(), anonymous);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue