fix(接口测试): 修复重跑结果状态错误问题

This commit is contained in:
fit2-zhao 2022-07-08 18:27:36 +08:00 committed by f2c-ci-robot[bot]
parent 0a2f0d090a
commit 6b63f338fa
2 changed files with 9 additions and 5 deletions

View File

@ -268,7 +268,7 @@ public class ApiCaseExecuteService {
if (StringUtils.isEmpty(request.getTriggerMode())) {
request.setTriggerMode(ApiRunMode.DEFINITION.name());
}
// 重试数据直接获取执行的报告
Map<String, ApiDefinitionExecResultWithBLOBs> executeQueue = request.isRerun() ? request.getExecuteQueue() : new LinkedHashMap<>();
String status = request.getConfig().getMode().equals(RunModeConstants.SERIAL.toString()) ? APITestStatus.Waiting.name() : APITestStatus.Running.name();

View File

@ -432,12 +432,16 @@
<select id="selectRerunResult" resultType="io.metersphere.base.domain.ApiDefinitionExecResultWithBLOBs">
SELECT
*
r.*
FROM
api_definition_exec_result
api_definition_exec_result r
INNER JOIN api_test_case c ON r.resource_id = c.id
AND c.`status` != 'Trash'
WHERE
status != 'success'
AND integrated_report_id = #{reportId} order by create_time asc
r.STATUS != 'success'
AND r.integrated_report_id = #{reportId}
ORDER BY
r.create_time ASC
</select>
</mapper>