refactor(接口测试): 改成同步发送执行指令,调整连接参数

This commit is contained in:
guoyuqi 2022-07-29 19:10:40 +08:00 committed by fit2-zhao
parent 39012deca8
commit f2cadd041a
2 changed files with 2 additions and 2 deletions

View File

@ -150,7 +150,7 @@ public class JMeterService {
} }
} }
private void send(JmeterRunRequestDTO request) { private synchronized void send(JmeterRunRequestDTO request) {
try { try {
if (redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()) != null) { if (redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()) != null) {
long index = Long.parseLong(redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()).toString()); long index = Long.parseLong(redisTemplate.opsForValue().get(SmoothWeighted.EXEC_INDEX + request.getPoolId()).toString());

View File

@ -35,7 +35,7 @@ public class WebConfig implements WebMvcConfigurer {
private final static int MAX_PER_ROUTE = 500; private final static int MAX_PER_ROUTE = 500;
private final static int CONN_REQUEST_TIMEOUT = 5000; private final static int CONN_REQUEST_TIMEOUT = 5000;
private final static int CONNECT_TIMEOUT = 8000; private final static int CONNECT_TIMEOUT = 8000;
private final static int SOCKET_TIMEOUT = 10 * 1000; private final static int SOCKET_TIMEOUT = 20 * 1000;
@Bean @Bean
public RestTemplate restTemplate() { public RestTemplate restTemplate() {