Skip to content

Commit 1fb50ab

Browse files
committed
Fixed NPE while testing ZeppelinSparkClusterTest
1 parent d1c4344 commit 1fb50ab

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinSparkClusterTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public void basicRDDTransformationAndActionTest() throws IOException {
9696
@Test
9797
public void sparkSQLTest() throws IOException {
9898
// create new note
99-
Note note = ZeppelinServer.notebook.createNote(null);
99+
Note note = ZeppelinServer.notebook.createNote(anonymous);
100100
int sparkVersion = getSparkVersionNumber(note);
101101
// DataFrame API is available from spark 1.3
102102
if (sparkVersion >= 13) {
@@ -140,7 +140,7 @@ public void sparkSQLTest() throws IOException {
140140
assertEquals(InterpreterResult.Type.TABLE, p.getResult().type());
141141
assertEquals("_1\t_2\nhello\t20\n", p.getResult().message());
142142
}
143-
ZeppelinServer.notebook.removeNote(note.getId(), null);
143+
ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
144144
}
145145
}
146146

@@ -226,6 +226,7 @@ public void pySparkTest() throws IOException {
226226
p.setText("%pyspark from pyspark.sql import Row\n" +
227227
"df=sqlContext.createDataFrame([Row(id=1, age=20)])\n" +
228228
"z.show(df)");
229+
p.setAuthenticationInfo(anonymous);
229230
note.run(p.getId());
230231
waitForFinish(p);
231232
assertEquals(Status.FINISHED, p.getStatus());

0 commit comments

Comments
 (0)