You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2018/08/10 01:47:35 UTC

zeppelin git commit: [ZEPPELIN-3684] Remove cron job in ZeppelinRestApiTest.testCronDisable

Repository: zeppelin
Updated Branches:
  refs/heads/master 994acfeb7 -> f699b3c2d


[ZEPPELIN-3684] Remove cron job in ZeppelinRestApiTest.testCronDisable

### What is this PR for?
`testCronDisable` in `ZeppelinRestApiTest` produces error:
```
09:15:51,001 ERROR org.quartz.core.ErrorLogger:2425 - Job (note.2DPJCQJGP threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: java.lang.NullPointerException]
	at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
	at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573)
Caused by: java.lang.NullPointerException
	at org.apache.zeppelin.notebook.Notebook$CronJob.execute(Notebook.java:925)
	at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
	... 1 more
```
Because cron job is not removed

### What type of PR is it?
Bug Fix

### What is the Jira issue?
* issue on Jira https://issues.apache.org/jira/browse/ZEPPELIN-3684

### How should this be tested?
* Tested manually
* [CI pass](https://travis-ci.org/TinkoffCreditSystems/zeppelin/builds/412604637)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: egorklimov <kl...@gmail.com>

Closes #3111 from egorklimov/ZEPPELIN-3684 and squashes the following commits:

5abd8fbec [egorklimov] testCronDisable fixed


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/f699b3c2
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/f699b3c2
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/f699b3c2

Branch: refs/heads/master
Commit: f699b3c2d71ffbdd1eea7e8de569554ae39b525c
Parents: 994acfe
Author: egorklimov <kl...@gmail.com>
Authored: Mon Aug 6 14:39:25 2018 +0300
Committer: Jeff Zhang <zj...@apache.org>
Committed: Fri Aug 10 09:47:16 2018 +0800

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java     | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/f699b3c2/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
index 1747c36..ce867ee 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/rest/ZeppelinRestApiTest.java
@@ -582,6 +582,12 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
     postCron.releaseConnection();
     Thread.sleep(1000);
 
+    // remove cron job.
+    DeleteMethod deleteCron = httpDelete("/notebook/cron/" + note.getId());
+    assertThat("", deleteCron, isAllowed());
+    deleteCron.releaseConnection();
+    Thread.sleep(1000);
+
     System.clearProperty(ConfVars.ZEPPELIN_NOTEBOOK_CRON_FOLDERS.getVarName());
     ZeppelinServer.notebook.removeNote(note.getId(), anonymous);
   }