Browse Source

1、优化代码;

pro_v1
mh 2 months ago
parent
commit
3b87a5b40d
  1. 102
      user-service/src/test/java/com/mh/user/socket/NettyClientTest.java

102
user-service/src/test/java/com/mh/user/socket/NettyClientTest.java

@ -1,52 +1,52 @@
package com.mh.user.socket; //package com.mh.user.socket;
//
import lombok.extern.slf4j.Slf4j; //import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test; //import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest; //import org.springframework.boot.test.context.SpringBootTest;
//
/** ///**
* @author ljf // * @author ljf
* @title // * @title :
* @description // * @description :
* @updateTime 2020-05-13 // * @updateTime 2020-05-13
* @throws // * @throws :
*/ // */
@Slf4j //@Slf4j
@SpringBootTest //@SpringBootTest
public class NettyClientTest { //public class NettyClientTest {
//
@Test // @Test
void Test() throws InterruptedException { // void Test() throws InterruptedException {
NettyClient nettyClient = new NettyClient(); // NettyClient nettyClient = new NettyClient();
nettyClient.connect(1008,"192.168.1.222"); // nettyClient.connect(1008,"192.168.1.222");
// Thread.sleep(5000); //// Thread.sleep(5000);
// nettyClient.connect(10100,"192.168.1.222"); //// nettyClient.connect(10100,"192.168.1.222");
} // }
//
@Test // @Test
void Test1() throws InterruptedException { // void Test1() throws InterruptedException {
NettyClient nettyClient = new NettyClient(); // NettyClient nettyClient = new NettyClient();
nettyClient.connect(8080,"192.168.2.10"); // nettyClient.connect(8080,"192.168.2.10");
// Thread.sleep(5000); //// Thread.sleep(5000);
// nettyClient.connect(10100,"192.168.1.222"); //// nettyClient.connect(10100,"192.168.1.222");
} // }
//
@Test // @Test
void testChillers() throws InterruptedException { // void testChillers() throws InterruptedException {
} // }
//
@Test // @Test
void testDDCChillers() throws InterruptedException { // void testDDCChillers() throws InterruptedException {
NettyChillerDDCClient.connect(8080,"169.254.194.199");
// NettyChillerDDCClient.connect(8080,"169.254.194.199"); // NettyChillerDDCClient.connect(8080,"169.254.194.199");
//// NettyChillerDDCClient.connect(8080,"169.254.194.199");
} //
// }
@Test //
void testMeterChillers() throws InterruptedException { // @Test
NettyMeterClient nettyMeterClient = new NettyMeterClient(); // void testMeterChillers() throws InterruptedException {
nettyMeterClient.connect(8080,"192.168.2.10"); // NettyMeterClient nettyMeterClient = new NettyMeterClient();
// nettyMeterClient.connect(9000,"192.168.2.54"); // nettyMeterClient.connect(8080,"192.168.2.10");
} //// nettyMeterClient.connect(9000,"192.168.2.54");
// }
} //
//}

Loading…
Cancel
Save