获取证书列表测试
This commit is contained in:
parent
25af2e8fde
commit
d0fbe3e48c
@ -16,52 +16,52 @@ import static com.sunyard.sydapi.util.PrintUtil.printRetWrap;
|
||||
public class CertTest {
|
||||
|
||||
|
||||
// public static void main(String[] args) {
|
||||
// System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
//
|
||||
// SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.0.100", 8889, null, 1000);
|
||||
// try{
|
||||
// RetWrap allCert = api.getAllCert(0);
|
||||
// printRetWrap(allCert);
|
||||
//
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }finally {
|
||||
// api.disconnect();
|
||||
// }
|
||||
// }
|
||||
public static void main(String[] args) {
|
||||
System.setProperty("com.sunyard.sydapi4j.debug", "true");
|
||||
|
||||
// 测试参数
|
||||
private static final int threads = 1;
|
||||
private static final long duration = 120000;
|
||||
private static final long warmUp = 30000;
|
||||
|
||||
|
||||
@Rule
|
||||
public JunitPerfRule junitPerfRule = new JunitPerfRule();
|
||||
SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129",8889,null,3000);
|
||||
|
||||
|
||||
@BeforeClass
|
||||
public static void init() throws UnsupportedEncodingException {
|
||||
System.out.println("begin");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@AfterClass
|
||||
public static void after() {
|
||||
System.out.println("all over");
|
||||
}
|
||||
|
||||
@Test
|
||||
@JunitPerfConfig(threads = threads, warmUp = warmUp, duration = duration)
|
||||
public void getAllCert(){
|
||||
SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129", 8889, null, 1000);
|
||||
try{
|
||||
api.getAllCert(0);
|
||||
RetWrap allCert = api.getAllCert(0);
|
||||
printRetWrap(allCert);
|
||||
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
api.disconnect();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// 测试参数
|
||||
// private static final int threads = 1;
|
||||
// private static final long duration = 120000;
|
||||
// private static final long warmUp = 30000;
|
||||
//
|
||||
//
|
||||
// @Rule
|
||||
// public JunitPerfRule junitPerfRule = new JunitPerfRule();
|
||||
// SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129",8889,null,3000);
|
||||
//
|
||||
//
|
||||
// @BeforeClass
|
||||
// public static void init() throws UnsupportedEncodingException {
|
||||
// System.out.println("begin");
|
||||
//
|
||||
// }
|
||||
//
|
||||
//
|
||||
// @AfterClass
|
||||
// public static void after() {
|
||||
// System.out.println("all over");
|
||||
// }
|
||||
//
|
||||
// @Test
|
||||
// @JunitPerfConfig(threads = threads, warmUp = warmUp, duration = duration)
|
||||
// public void getAllCert(){
|
||||
// try {
|
||||
// api.getAllCert(0);
|
||||
// } catch (Exception e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// }
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user