From d0fbe3e48c917324b1e6cc896fd7c606ffe5af92 Mon Sep 17 00:00:00 2001 From: chuzhenyang <2552648939@qq.com> Date: Thu, 10 Nov 2022 15:47:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E8=AF=81=E4=B9=A6=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/sunyard/sydapi/test/CertTest.java | 92 +++++++++---------- 1 file changed, 46 insertions(+), 46 deletions(-) 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(); +// } +// +// } }