REM:
1. 调整TaskService单元测试执行顺序
This commit is contained in:
HuangXin 2020-05-09 19:02:51 +08:00
parent 6b8a61589d
commit b5fc6d03cd
2 changed files with 4 additions and 2 deletions

View File

@ -24,6 +24,7 @@ import org.junit.runners.Suite;
@RunWith(Suite.class)
@Suite.SuiteClasses({
MyConfigTest.class,
TaskServiceTest.class,
DisposeConfigureTest.class,
DisposeTaskMapperTest.class,
DisposeNodeManagerTest.class,
@ -35,8 +36,7 @@ import org.junit.runners.Suite;
DeviceNodeManagerControllerTest.class,
DeviceNodeInfoControllerTest.class,
UserAccountServiceTest.class,
TaskControllerTest.class,
TaskServiceTest.class
TaskControllerTest.class
})
public class AllDisposePlatformTest {

View File

@ -80,9 +80,11 @@ public class TaskServiceTest extends InitTestEnvironment {
*/
@Test
public void t2_stopTaskTest() {
t1_startTaskTest();
disposeTaskMapper.getAllTaskByStatus(DisposeTaskStatus.TASK_RUNNING.getCode()).forEach(v -> {
ErrorCode err = taskService.stopTask(v.getId());
Assert.assertEquals(err, ErrorCode.ERR_OK);
taskService.finishTask(v.getId());
});
}