Skip to content

Commit

Permalink
#354 fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
kfchu committed Feb 1, 2018
1 parent 8df0d67 commit 68b1081
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ public void testGetExecutionStatusSuccessfully() throws Exception {

when(registryCenterService.getCuratorFrameworkOp(namespace)).thenReturn(curatorFrameworkOp);

when(curatorFrameworkOp.checkExists(JobNodePath.getExecutionNodePath(jobName))).thenReturn(true);
List<String> shardItems = Lists.newArrayList("0", "1", "2", "3", "4");
when(curatorFrameworkOp.getChildren(JobNodePath.getExecutionNodePath(jobName))).thenReturn(shardItems);

when(curatorFrameworkOp.getChildren(JobNodePath.getServerNodePath(jobName)))
.thenReturn(Lists.newArrayList(executorName));
Expand Down Expand Up @@ -96,7 +97,7 @@ public void testGetExecutionStatusSuccessfully() throws Exception {

List<ExecutionInfo> result = jobService.getExecutionStatus(namespace, jobName);

assertEquals("size should be 1", 5, result.size());
assertEquals("size should be 5", 5, result.size());
// verify 0号分片
ExecutionInfo executionInfo = result.get(0);

Expand Down

0 comments on commit 68b1081

Please sign in to comment.