This is an automated email from the ASF dual-hosted git repository. liyang pushed a commit to branch sync in repository https://gitbox.apache.org/repos/asf/kylin.git
commit c6829f133f593ce8ee327baf8b797be781b73e27 Author: nichunen <chunen...@kyligence.io> AuthorDate: Fri Feb 9 14:22:25 2018 +0800 Fix unstable ut org.apache.kylin.job.impl.threadpool.DefaultSchedulerTest#testMetaStoreRecover --- .../job/impl/threadpool/DefaultSchedulerTest.java | 24 +++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java index 3b24fe6..3c1a7ea 100644 --- a/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java +++ b/core-job/src/test/java/org/apache/kylin/job/impl/threadpool/DefaultSchedulerTest.java @@ -18,6 +18,16 @@ package org.apache.kylin.job.impl.threadpool; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import java.io.FileNotFoundException; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.ScheduledFuture; +import java.util.concurrent.TimeUnit; + import org.apache.kylin.common.KylinConfig; import org.apache.kylin.job.BaseTestExecutable; import org.apache.kylin.job.ErrorTestExecutable; @@ -39,16 +49,6 @@ import org.junit.rules.ExpectedException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.FileNotFoundException; -import java.util.concurrent.CountDownLatch; -import java.util.concurrent.Executors; -import java.util.concurrent.ScheduledExecutorService; -import java.util.concurrent.ScheduledFuture; -import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - /** */ public class DefaultSchedulerTest extends BaseSchedulerTest { @@ -184,14 +184,14 @@ public class DefaultSchedulerTest extends BaseSchedulerTest { @Test public void testMetaStoreRecover() throws Exception { - logger.info("tesMetaStoreRecover"); + logger.info("testMetaStoreRecover"); NoErrorStatusExecutable job = new NoErrorStatusExecutable(); ErrorTestExecutable task = new ErrorTestExecutable(); job.addTask(task); execMgr.addJob(job); Thread.sleep(2500); runningJobToError(job.getId()); - Thread.sleep(2500); + waitForJobFinish(job.getId(), 10000); Assert.assertEquals(ExecutableState.ERROR, execMgr.getOutput(job.getId()).getState()); } -- To stop receiving notification emails like this one, please contact liy...@apache.org.