parent
121c94a5ba
commit
37c5f5827a
|
@ -171,12 +171,35 @@ public class TaskInfoMapperTest extends InitTestEnvironment {
|
|||
taskInfo.getId(), taskInfo.getStatus(), changeStatus);
|
||||
|
||||
taskInfoMapper.changeTaskInfoStatus(taskInfo.getId(), changeStatus);
|
||||
Assert.assertNotEquals(beforeStatus, new Long((long) taskInfoMapper.getTaskInfoCurrentStatus(taskInfo.getId())));
|
||||
Assert.assertNotEquals(beforeStatus, new Long(taskInfoMapper.getTaskInfoCurrentStatus(taskInfo.getId())));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* T 5 del task information by deviceId.
|
||||
*/
|
||||
@Test
|
||||
public void t5_removeTaskInfoById() {
|
||||
List<TaskInfoDetail> taskInfoDetailList = disposeTaskMapper.getAllTaskByType(DeviceCapacity.CLEANUP.getCode());
|
||||
if (taskInfoDetailList.size() > 0) {
|
||||
for (TaskInfoDetail task : taskInfoDetailList
|
||||
) {
|
||||
log.info("taskId:{}", task.getId());
|
||||
TaskInfo taskInfo = taskInfoMapper.getTaskInfo(task.getId(), task.getDeviceId());
|
||||
if (taskInfo != null) {
|
||||
Assert.assertNotNull(taskInfo);
|
||||
|
||||
taskInfoMapper.removeTaskInfoById(task.getDeviceId());
|
||||
taskInfo = taskInfoMapper.getTaskInfo(task.getId(), task.getDeviceId());
|
||||
Assert.assertNull(taskInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue