@Test public void testIsNotAllCompleted() { when(jobNodeStorage.isJobNodeExisted("guarantee/completed")).thenReturn(true); when(jobNodeStorage.getJobNodeChildrenKeys("guarantee/completed")).thenReturn(Arrays.asList("0", "1")); assertFalse(guaranteeService.isAllCompleted()); }
public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.getShardingTotalCount() == jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.getShardingTotalCount() == jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.getShardingTotalCount() == jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.getShardingTotalCount() == jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration); void registerStart(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo(); }
GuaranteeService { public boolean isAllCompleted() { return jobNodeStorage.isJobNodeExisted(GuaranteeNode.COMPLETED_ROOT) && configService.getShardingTotalCount() == jobNodeStorage.getJobNodeChildrenKeys(GuaranteeNode.COMPLETED_ROOT).size(); } GuaranteeService(final CoordinatorRegistryCenter coordinatorRegistryCenter, final JobConfiguration jobConfiguration); void registerStart(final Collection<Integer> shardingItems); boolean isAllStarted(); void clearAllStartedInfo(); void registerComplete(final Collection<Integer> shardingItems); boolean isAllCompleted(); void clearAllCompletedInfo();  }