fix(测试跟踪): 修复测试计划串行时场景执行顺序不对的问题

--bug=1021826 --user=宋天阳 【测试跟踪】测试计划执行,勾选失败停止,场景在失败的用例后还有一个执行了的
https://www.tapd.cn/55049933/s/1325770
This commit is contained in:
song-tianyang 2023-01-10 22:32:51 +08:00 committed by 建国
parent cf4d6d5d9d
commit 90e776b0f2
1 changed files with 5 additions and 2 deletions

View File

@ -204,8 +204,11 @@ public class ApiScenarioExecuteService {
if (CollectionUtils.isNotEmpty(testPlanApiScenarioList)) {
List<String> ids = testPlanApiScenarioList.stream().map(TestPlanApiScenarioInfoDTO::getApiScenarioId).collect(Collectors.toList());
request.setIds(ids);
vo.setTestPlanScenarioMap(testPlanApiScenarioList.stream()
.collect(Collectors.toMap(TestPlanApiScenarioInfoDTO::getId, Function.identity(), (t1, t2) -> t1)));
//这段代码之前的写法是开了testPlanApiScenarioList的流但是这样造成的后果是获得了乱序的HashMap而我们需要的是LinkedHashMap
testPlanApiScenarioList.forEach(dto -> {
vo.getTestPlanScenarioMap().put(dto.getId(), dto);
});
}
} else {
ServiceUtils.getSelectAllIds(request, request.getCondition(), (query) -> extApiScenarioMapper.selectIdsByQuery(query));