From 13e9bbd3c20e3520cd06562c4a9380e63f18b132 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Wed, 16 Feb 2022 16:48:10 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8=E5=8C=96?= =?UTF-8?q?=E5=9C=BA=E6=99=AF=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95=E5=93=8D?= =?UTF-8?q?=E5=BA=94=E6=96=AD=E8=A8=80=E4=B8=8D=E5=87=86=E7=A1=AE=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1010232 --user=王孝刚 【接口测试】github#10412,接口测试响应断言不准确 https://www.tapd.cn/55049933/s/1104624 --- .../metersphere/api/service/ApiDefinitionExecResultService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java index be4668dca0..ce02aa3e16 100644 --- a/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java +++ b/backend/src/main/java/io/metersphere/api/service/ApiDefinitionExecResultService.java @@ -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_")) {