修改测试代码

This commit is contained in:
junj2.liang 2022-09-13 13:50:47 +08:00
parent 2a2bcb33e5
commit 3bff06126b
2 changed files with 2 additions and 3 deletions

View File

@ -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};

View File

@ -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(() -> {