@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); }