From 3bff06126b8f0f7a096b8dc8da62bfb8dff852d1 Mon Sep 17 00:00:00 2001 From: "junj2.liang" Date: Tue, 13 Sep 2022 13:50:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B5=8B=E8=AF=95=E4=BB=A3?= =?UTF-8?q?=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/test/java/sample/ShortLinkSample.java | 1 + src/test/java/test/FuncTest.java | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/test/java/sample/ShortLinkSample.java b/src/test/java/sample/ShortLinkSample.java index bb283fb..ecfa57f 100644 --- a/src/test/java/sample/ShortLinkSample.java +++ b/src/test/java/sample/ShortLinkSample.java @@ -8,6 +8,7 @@ public class ShortLinkSample { public static void main(String[] args) { // 路径要以 / 或 \\ 结尾表示目录 + SydApi.SYD_SetLogConfig("./logs/",3); String[] pcipList = {"127.0.0.1", "192.168.0.200" }; int[] iportList = {8080,8889}; diff --git a/src/test/java/test/FuncTest.java b/src/test/java/test/FuncTest.java index c7617dc..d7fc6ae 100644 --- a/src/test/java/test/FuncTest.java +++ b/src/test/java/test/FuncTest.java @@ -52,11 +52,10 @@ public class FuncTest { public void originLong() throws Exception { SydApiBuilder builder = new SydApiBuilder(new String[]{"192.168.1.129"}, new int[]{8889}, 10, 15); SydApi.SYD_SetLogConfig("./logs/",3); - - final SydApi api = builder.build(); for (int i = 0; i < 1000; i++) { int tmp = i; new Thread(() -> { + SydApi api = builder.build(); for (int j = 0; j < 20; j++) { byte[] bytes = api.SYD_SM4_ShortData(0, (tmp + "t" + j).getBytes(), Consts.ECB_ENC); byte[] result = api.SYD_SM4_ShortData(0, bytes, Consts.ECB_DEC); @@ -70,7 +69,6 @@ public class FuncTest { Logger log = LogFactory.getLogger(); String[] pcipList = {"192.168.1.129", "192.168.1.129" }; int[] iportList ={8080,8889}; - for (int i = 0; i < 1000; i++) { int tmp = i; new Thread(() -> {