|
@@ -1,14 +1,15 @@
|
|
|
package com.hrsk.cloud.op.eg.repository;
|
|
|
|
|
|
|
|
|
+import com.hrsk.cloud.eg.infrastructure.clinent.config.RetryRestTemplate;
|
|
|
import org.junit.Test;
|
|
|
import org.junit.runner.RunWith;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
+import org.springframework.web.client.RestTemplate;
|
|
|
|
|
|
|
|
|
-
|
|
|
-/**
|
|
|
+/**
|
|
|
* @description: 测试类
|
|
|
* @param:
|
|
|
* @return:
|
|
@@ -22,6 +23,9 @@ public class CustomerMapperTest {
|
|
|
|
|
|
@Test
|
|
|
public void test() {
|
|
|
-
|
|
|
+ RestTemplate restTemplate = new RetryRestTemplate().restTemplate();
|
|
|
+ for (int i = 0; i < 100; i++) {
|
|
|
+ restTemplate.postForEntity("https://www.baidu.com", null, String.class);
|
|
|
+ }
|
|
|
}
|
|
|
}
|