mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
update testcase.
This commit is contained in:
parent
722f05b944
commit
3e2ea3d4df
1 changed files with 4 additions and 9 deletions
|
|
@ -316,30 +316,25 @@ public class ZeppelinRestApiTest extends AbstractTestRestApi {
|
|||
PostMethod postNoteJobs = httpPost("/notebook/job/" + noteID, "");
|
||||
assertThat("test notebook jobs run:", postNoteJobs, isAccepted());
|
||||
postNoteJobs.releaseConnection();
|
||||
Thread.sleep(1000);
|
||||
|
||||
// wait until job is finished or timeout.
|
||||
int timeout = 1;
|
||||
while (paragraph.getStatus() == Status.PENDING || paragraph.isTerminated()) {
|
||||
Thread.sleep(1000);
|
||||
if (timeout++ > 10) {
|
||||
LOG.info("testNoteJobs timeout job.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// Call Stop Notebook Jobs REST API
|
||||
DeleteMethod deleteNoteJobs = httpDelete("/notebook/job/" + noteID);
|
||||
assertThat("test notebook stop:", deleteNoteJobs, isAccepted());
|
||||
deleteNoteJobs.releaseConnection();
|
||||
Thread.sleep(1000);
|
||||
|
||||
// Call Run paragraph REST API
|
||||
PostMethod postParagraph = httpPost("/notebook/job/" + noteID + "/" + paragraph.getId(), "");
|
||||
assertThat("test paragraph run:", postParagraph, isAccepted());
|
||||
postParagraph.releaseConnection();
|
||||
Thread.sleep(1000);
|
||||
|
||||
// Call Stop paragraph REST API
|
||||
DeleteMethod deleteParagraph = httpDelete("/notebook/job/" + noteID + "/" + paragraph.getId());
|
||||
assertThat("test paragraph stop:", deleteParagraph, isAccepted());
|
||||
deleteParagraph.releaseConnection();
|
||||
Thread.sleep(1000);
|
||||
|
||||
//cleanup
|
||||
ZeppelinServer.notebook.removeNote(note.getId());
|
||||
|
|
|
|||
Loading…
Reference in a new issue