Skip to content

Commit e84703d

Browse files
committed
1 parent ad80951 commit e84703d

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public void testSelectingReplImplementation() throws IOException {
129129
note.run(p2.getId());
130130
while(p2.isTerminated()==false || p2.getResult()==null) Thread.yield();
131131
assertEquals("repl2: hello world", p2.getResult().message());
132-
notebook.removeNote(note.getId(), null);
132+
notebook.removeNote(note.getId(), anonymous);
133133
}
134134

135135
@Test
@@ -213,7 +213,7 @@ public void testPersist() throws IOException, SchedulerException, RepositoryExce
213213
new InterpreterFactory(conf, null, null, null, depResolver, false), this, null, null, null);
214214

215215
assertEquals(1, notebook2.getAllNotes().size());
216-
notebook.removeNote(note.getId(), null);
216+
notebook.removeNote(note.getId(), anonymous);
217217
}
218218

219219
@Test
@@ -226,7 +226,7 @@ public void testCreateNoteWithSubject() throws IOException, SchedulerException,
226226
Set<String> owners = new HashSet<>();
227227
owners.add("user1");
228228
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(note.getId()));
229-
notebook.removeNote(note.getId(), null);
229+
notebook.removeNote(note.getId(), anonymous);
230230
}
231231

232232
@Test
@@ -246,7 +246,7 @@ public void testClearParagraphOutput() throws IOException, SchedulerException{
246246
// clear paragraph output/result
247247
note.clearParagraphOutput(p1.getId());
248248
assertNull(p1.getResult());
249-
notebook.removeNote(note.getId(), null);
249+
notebook.removeNote(note.getId(), anonymous);
250250
}
251251

252252
@Test
@@ -317,7 +317,7 @@ public void testSchedule() throws InterruptedException, IOException {
317317
assertNotNull(dateFinished);
318318
Thread.sleep(1 * 1000);
319319
assertEquals(dateFinished, p.getDateFinished());
320-
notebook.removeNote(note.getId(), null);
320+
notebook.removeNote(note.getId(), anonymous);
321321
}
322322

323323
@Test
@@ -370,7 +370,7 @@ public void testAutoRestartInterpreterAfterSchedule() throws InterruptedExceptio
370370
// make sure all paragraph has been executed
371371
assertNotNull(p.getDateFinished());
372372
assertNotNull(p2.getDateFinished());
373-
notebook.removeNote(note.getId(), null);
373+
notebook.removeNote(note.getId(), anonymous);
374374
}
375375

376376
@Test
@@ -407,9 +407,9 @@ public void testExportAndImportNote() throws IOException, CloneNotSupportedExcep
407407
Set<String> owners = new HashSet<>();
408408
owners.add("user1");
409409
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(importedNote2.getId()));
410-
notebook.removeNote(note.getId(), null);
411-
notebook.removeNote(importedNote.getId(), null);
412-
notebook.removeNote(importedNote2.getId(), null);
410+
notebook.removeNote(note.getId(), anonymous);
411+
notebook.removeNote(importedNote.getId(), anonymous);
412+
notebook.removeNote(importedNote2.getId(), anonymous);
413413
}
414414

415415
@Test
@@ -441,9 +441,9 @@ public void testCloneNote() throws IOException, CloneNotSupportedException,
441441
Set<String> owners = new HashSet<>();
442442
owners.add("user1");
443443
assertEquals(owners, notebook.getNotebookAuthorization().getOwners(cloneNote2.getId()));
444-
notebook.removeNote(note.getId(), null);
445-
notebook.removeNote(cloneNote.getId(), null);
446-
notebook.removeNote(cloneNote2.getId(), null);
444+
notebook.removeNote(note.getId(), anonymous);
445+
notebook.removeNote(cloneNote.getId(), anonymous);
446+
notebook.removeNote(cloneNote2.getId(), anonymous);
447447
}
448448

449449
@Test
@@ -454,8 +454,8 @@ public void testCloneNoteWithNoName() throws IOException, CloneNotSupportedExcep
454454

455455
Note cloneNote = notebook.cloneNote(note.getId(), null, anonymous);
456456
assertEquals(cloneNote.getName(), "Note " + cloneNote.getId());
457-
notebook.removeNote(note.getId(), null);
458-
notebook.removeNote(cloneNote.getId(), null);
457+
notebook.removeNote(note.getId(), anonymous);
458+
notebook.removeNote(cloneNote.getId(), anonymous);
459459
}
460460

461461
@Test
@@ -480,8 +480,8 @@ public void testCloneNoteWithExceptionResult() throws IOException, CloneNotSuppo
480480
assertEquals(cp.getId(), p.getId());
481481
assertEquals(cp.text, p.text);
482482
assertNull(cp.getResult());
483-
notebook.removeNote(note.getId(), null);
484-
notebook.removeNote(cloneNote.getId(), null);
483+
notebook.removeNote(note.getId(), anonymous);
484+
notebook.removeNote(cloneNote.getId(), anonymous);
485485
}
486486

487487
@Test
@@ -575,7 +575,7 @@ public void testAngularObjectRemovalOnParagraphRemove() throws InterruptedExcept
575575
// notebook scope and global object sould be remained
576576
assertNotNull(registry.get("o2", note.getId(), null));
577577
assertNotNull(registry.get("o3", null, null));
578-
notebook.removeNote(note.getId(), null);
578+
notebook.removeNote(note.getId(), anonymous);
579579
}
580580

581581
@Test
@@ -685,7 +685,7 @@ public void testAbortParagraphStatusOnInterpreterRestart() throws InterruptedExc
685685
}
686686

687687
assertTrue(isAborted);
688-
notebook.removeNote(note.getId(), null);
688+
notebook.removeNote(note.getId(), anonymous);
689689
}
690690

691691
@Test
@@ -899,8 +899,8 @@ public void testGetAllNotes() throws Exception {
899899
assertEquals(0, notebook.getAllNotes(anonymous).size());
900900
assertEquals(1, notebook.getAllNotes(new AuthenticationInfo("user1")).size());
901901
assertEquals(1, notebook.getAllNotes(new AuthenticationInfo("user2")).size());
902-
notebook.removeNote(note1.getId(), null);
903-
notebook.removeNote(note2.getId(), null);
902+
notebook.removeNote(note1.getId(), anonymous);
903+
notebook.removeNote(note2.getId(), anonymous);
904904
}
905905

906906

0 commit comments

Comments
 (0)