Skip to content

Commit 6405abe

Browse files
committed
Update RemoteSchedulerTest
1 parent c31a807 commit 6405abe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

zeppelin-interpreter/src/test/java/com/nflabs/zeppelin/scheduler/RemoteSchedulerTest.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public void test() throws Exception {
5353
intpA.getInterpreterProcess(),
5454
10);
5555

56-
scheduler.submit(new Job("jobName", null) {
56+
Job job = new Job("jobId", "jobName", null, 200) {
5757

5858
@Override
5959
public int progress() {
@@ -68,7 +68,7 @@ public Map<String, Object> info() {
6868
@Override
6969
protected Object jobRun() throws Throwable {
7070
intpA.interpret("500", new InterpreterContext(
71-
"id",
71+
"jobId",
7272
"title",
7373
"text",
7474
new HashMap<String, Object>(),
@@ -80,8 +80,12 @@ protected Object jobRun() throws Throwable {
8080
protected boolean jobAbort() {
8181
return false;
8282
}
83+
};
84+
scheduler.submit(job);
8385

84-
});
86+
while (job.isTerminated() == false) {
87+
Thread.sleep(200);
88+
}
8589

8690
intpA.close();
8791
schedulerSvc.removeScheduler("test");

0 commit comments

Comments
 (0)