@Test public void assertJobInit() { while (!StreamingSequenceDataFlowElasticJob.isCompleted()) { WaitingUtils.waitingShortTime(); } assertTrue(getRegCenter().isExisted("/" + getJobName() + "/execution")); assertThat(ProcessCountStatistics.getProcessSuccessCount(getJobName()), is(30)); assertThat(ProcessCountStatistics.getProcessFailureCount(getJobName()), is(0)); }
@Before public void setUp() { ProcessCountStatistics.reset(jobName); jobConfig.setShardingItemParameters("0=A,1=B,2=C"); jobConfig.setDisabled(disabled); jobConfig.setMonitorPort(monitorPort); jobConfig.setOverwrite(true); REG_CENTER.init(); }
@After public void tearDown() throws SchedulerException, NoSuchFieldException { ProcessCountStatistics.reset(jobName); JobScheduler jobScheduler = JobRegistry.getInstance().getJob(jobName); if (null != jobScheduler) { JobRegistry.getInstance().getJob(jobName).shutdown(); } ReflectionUtils.setFieldValue(JobRegistry.getInstance(), "instance", null); }
@After public void tearDown() throws NoSuchFieldException { ProcessCountStatistics.reset(ElasticJobAssert.JOB_NAME); }