diff --git a/src/test/java/com/sunyard/sydapi/test/CertTest.java b/src/test/java/com/sunyard/sydapi/test/CertTest.java index 60c3287..611947c 100644 --- a/src/test/java/com/sunyard/sydapi/test/CertTest.java +++ b/src/test/java/com/sunyard/sydapi/test/CertTest.java @@ -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"); + + SydApi4j api = (SydApi4j) new SydApi4j().connect("192.168.1.129", 8889, null, 1000); + try{ + 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(); - } - - } +// 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(); +// } +// +// } }