refactor(接口测试): 改成同步发送执行指令,调整连接参数
This commit is contained in:
parent
39012deca8
commit
f2cadd041a
|
@ -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());
|
||||||
|
|
|
@ -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() {
|
||||||
|
|
Loading…
Reference in New Issue