获取证书列表测试

This commit is contained in:
chuzhenyang 2022-11-10 15:47:29 +08:00
parent 25af2e8fde
commit d0fbe3e48c

View File

@ -16,52 +16,52 @@ import static com.sunyard.sydapi.util.PrintUtil.printRetWrap;
public class CertTest { public class CertTest {
// public static void main(String[] args) { public static void main(String[] args) {
// System.setProperty("com.sunyard.sydapi4j.debug", "true"); System.setProperty("com.sunyard.sydapi4j.debug", "true");
//
// SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.0.100", 8889, null, 1000); SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129", 8889, null, 1000);
// try{ try{
// RetWrap allCert = api.getAllCert(0); RetWrap allCert = api.getAllCert(0);
// printRetWrap(allCert); printRetWrap(allCert);
//
// }catch (Exception e){ }catch (Exception e){
// e.printStackTrace(); e.printStackTrace();
// }finally { }finally {
// api.disconnect(); api.disconnect();
// } }
// } }
// 测试参数 // 测试参数
private static final int threads = 1; // private static final int threads = 1;
private static final long duration = 120000; // private static final long duration = 120000;
private static final long warmUp = 30000; // private static final long warmUp = 30000;
//
//
@Rule // @Rule
public JunitPerfRule junitPerfRule = new JunitPerfRule(); // public JunitPerfRule junitPerfRule = new JunitPerfRule();
SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129",8889,null,3000); // SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129",8889,null,3000);
//
//
@BeforeClass // @BeforeClass
public static void init() throws UnsupportedEncodingException { // public static void init() throws UnsupportedEncodingException {
System.out.println("begin"); // System.out.println("begin");
//
} // }
//
//
@AfterClass // @AfterClass
public static void after() { // public static void after() {
System.out.println("all over"); // System.out.println("all over");
} // }
//
@Test // @Test
@JunitPerfConfig(threads = threads, warmUp = warmUp, duration = duration) // @JunitPerfConfig(threads = threads, warmUp = warmUp, duration = duration)
public void getAllCert(){ // public void getAllCert(){
try { // try {
api.getAllCert(0); // api.getAllCert(0);
} catch (Exception e) { // } catch (Exception e) {
e.printStackTrace(); // e.printStackTrace();
} // }
//
} // }
} }