fix(接口测试): 修复接口自动化场景接口测试响应断言不准确的缺陷

--bug=1010232 --user=王孝刚 【接口测试】github#10412,接口测试响应断言不准确
https://www.tapd.cn/55049933/s/1104624
This commit is contained in:
wxg0103 2022-02-16 16:48:10 +08:00 committed by fit2-zhao
parent b588cdf53a
commit 13e9bbd3c2
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ public class ApiDefinitionExecResultService {
for (RequestResult item : requestResults) {
item.setEndTime(System.currentTimeMillis());
if (item.getResponseResult() != null) {
if (item.getResponseResult() != null && item.getResponseResult().getResponseTime() <= 0) {
item.getResponseResult().setResponseTime((item.getEndTime() - item.getStartTime()));
}
if (!StringUtils.startsWithAny(item.getName(), "PRE_PROCESSOR_ENV_", "POST_PROCESSOR_ENV_")) {