forked from rongchao/epmet-cloud-rizhao
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.3 KiB
46 lines
1.3 KiB
package com.epmet;
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
import com.epmet.commons.thirdplat.apiservice.jcet.JcetApiService;
|
|
import com.epmet.commons.thirdplat.bean.ThirdPlatUserInfo;
|
|
import lombok.extern.slf4j.Slf4j;
|
|
import org.junit.Test;
|
|
import org.junit.runner.RunWith;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
import org.springframework.test.context.junit4.SpringRunner;
|
|
|
|
/**
|
|
* desc:redisson测试类
|
|
*/
|
|
@Slf4j
|
|
@RunWith(value = SpringRunner.class)
|
|
@SpringBootTest(classes = {AuthApplication.class})
|
|
public class ThirdPlatformTest {
|
|
|
|
@Autowired
|
|
private JcetApiService jcetApiService;
|
|
|
|
@Test
|
|
public void t() {
|
|
String ssoTicket = "ssoTicket-5kc8FY7Re2iv7Kfq74G9EWCN7QybBjxB";
|
|
for (int i = 0; i < 50; i++) {
|
|
getUserINfoByTicket(ssoTicket);
|
|
}
|
|
|
|
}
|
|
|
|
private void getUserINfoByTicket(String ssoTicket) {
|
|
try {
|
|
ThirdPlatUserInfo cUserInfoByTicket = jcetApiService.getCUserInfoByTicket(ssoTicket);
|
|
log.info("result:{}", JSON.toJSONString(cUserInfoByTicket));
|
|
} catch (Exception e) {
|
|
log.info("失败:{}", e.getMessage());
|
|
if (e.getMessage().contains("Read timed out"))
|
|
log.info("失败了");
|
|
//break;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|