@Test public void assertIsNotAllCompleted() { when(jobNodeStorage.isJobNodeExisted("guarantee/completed")).thenReturn(false); assertFalse(guaranteeService.isAllCompleted()); }
public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); void registerStart(final Collection<Integer> shardingItems); boolean isRegisterStartSuccess(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isRegisterCompleteSuccess(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo(); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.load(false).getShardingTotalCount() <= jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter regCenter, final String jobName); void registerStart(final Collection<Integer> shardingItems); boolean isRegisterStartSuccess(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isRegisterCompleteSuccess(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo();  }