From f6a3b4d8dcbbcb84603b5965c0ed972b91c38d18 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 23 Sep 2021 19:02:21 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=B5=8B=E8=AF=95=E8=AE=A1=E5=88=92=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=8F=82=E6=95=B0=E5=90=8E=E8=AE=A1=E7=AE=97=E7=B2=92=E5=BA=A6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/service/PerformanceTestService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java index 8fd1b1b1d3..be5b4256a1 100644 --- a/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java +++ b/backend/src/main/java/io/metersphere/performance/service/PerformanceTestService.java @@ -826,13 +826,12 @@ public class PerformanceTestService { Integer granularity = CommonBeanFactory.getBean(JmeterProperties.class).getReport().getGranularity(); try { LoadTestReportWithBLOBs report = loadTestReportMapper.selectByPrimaryKey(reportId); - LoadTestWithBLOBs loadTest = loadTestMapper.selectByPrimaryKey(report.getTestId()); - JSONObject advancedConfig = JSON.parseObject(loadTest.getAdvancedConfiguration()); + JSONObject advancedConfig = JSON.parseObject(report.getAdvancedConfiguration()); if (advancedConfig.getInteger("granularity") != null) { return advancedConfig.getInteger("granularity") * 1000;// 单位是ms } AtomicReference maxDuration = new AtomicReference<>(0); - List> pressureConfigLists = JSON.parseObject(loadTest.getLoadConfiguration(), new TypeReference>>() { + List> pressureConfigLists = JSON.parseObject(report.getLoadConfiguration(), new TypeReference>>() { }); // 按照最长的执行时间来确定 pressureConfigLists.forEach(pcList -> {