Skip to content

Commit

Permalink
change bind on random port in test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrproliu committed Oct 21, 2019
1 parent 2c56cad commit 48ee18f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class NettySocketIOTest {
private Method roomLeaveMethod;
private Method roomJoinMethod;

private NettySocketIOClientInfo socketIOClientInfo = new NettySocketIOClientInfo(null, null, "127.0.0.1:9092");
private NettySocketIOClientInfo socketIOClientInfo = new NettySocketIOClientInfo(null, null, "127.0.0.1:0");

private EnhancedInstance enhancedInstance = new EnhancedInstance() {
@Override
Expand All @@ -94,7 +94,7 @@ public void setSkyWalkingDynamicField(Object value) {

@Before
public void setUp() {
InetSocketAddress addr = new InetSocketAddress("127.0.0.1", 9092);
InetSocketAddress addr = new InetSocketAddress("127.0.0.1", 0);
when(socketIOClient.getRemoteAddress()).thenReturn(addr);
when(sendPacket.getName()).thenReturn("test");
when(clientHead.getRemoteAddress()).thenReturn(addr);
Expand Down

0 comments on commit 48ee18f

Please sign in to comment.