From 342ac765c14d3e92005d149cb4ee2e68cd217f10 Mon Sep 17 00:00:00 2001 From: guoyuqi Date: Fri, 29 Jul 2022 19:10:40 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E6=94=B9=E6=88=90=E5=90=8C=E6=AD=A5=E5=8F=91=E9=80=81?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E6=8C=87=E4=BB=A4=EF=BC=8C=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E8=BF=9E=E6=8E=A5=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/io/metersphere/api/jmeter/JMeterService.java | 2 +- backend/src/main/java/io/metersphere/config/WebConfig.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java index 5b5e17a34b..2a61e8880d 100644 --- a/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java +++ b/backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java @@ -150,7 +150,7 @@ public class JMeterService { } } - private void send(JmeterRunRequestDTO request) { + private synchronized void send(JmeterRunRequestDTO request) { try { if (redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()) != null) { long index = Long.parseLong(redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()).toString()); diff --git a/backend/src/main/java/io/metersphere/config/WebConfig.java b/backend/src/main/java/io/metersphere/config/WebConfig.java index d824b9894b..6a78dbc3f7 100644 --- a/backend/src/main/java/io/metersphere/config/WebConfig.java +++ b/backend/src/main/java/io/metersphere/config/WebConfig.java @@ -35,7 +35,7 @@ public class WebConfig implements WebMvcConfigurer { private final static int MAX_PER_ROUTE = 500; private final static int CONN_REQUEST_TIMEOUT = 5000; private final static int CONNECT_TIMEOUT = 8000; - private final static int SOCKET_TIMEOUT = 10 * 1000; + private final static int SOCKET_TIMEOUT = 20 * 1000; @Bean public RestTemplate restTemplate() {