You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by er...@apache.org on 2022/04/29 09:09:27 UTC

[iotdb] branch bugfix/iotdb-3046 created (now ee8ea6adda)

This is an automated email from the ASF dual-hosted git repository.

ericpai pushed a change to branch bugfix/iotdb-3046
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at ee8ea6adda [IOTDB-3046] Fix port binding error in ClientManagerTest

This branch includes the following new commits:

     new ee8ea6adda [IOTDB-3046] Fix port binding error in ClientManagerTest

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: [IOTDB-3046] Fix port binding error in ClientManagerTest

Posted by er...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ericpai pushed a commit to branch bugfix/iotdb-3046
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit ee8ea6adda88db644e4ddcef43df419a5b265c2c
Author: ericpai <er...@hotmail.com>
AuthorDate: Fri Apr 29 17:09:13 2022 +0800

    [IOTDB-3046] Fix port binding error in ClientManagerTest
---
 .../src/test/java/org/apache/iotdb/commons/ClientManagerTest.java    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/node-commons/src/test/java/org/apache/iotdb/commons/ClientManagerTest.java b/node-commons/src/test/java/org/apache/iotdb/commons/ClientManagerTest.java
index 54eeb70625..6fff749b71 100644
--- a/node-commons/src/test/java/org/apache/iotdb/commons/ClientManagerTest.java
+++ b/node-commons/src/test/java/org/apache/iotdb/commons/ClientManagerTest.java
@@ -37,6 +37,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 import java.io.IOException;
+import java.net.InetSocketAddress;
 import java.net.ServerSocket;
 
 public class ClientManagerTest {
@@ -408,7 +409,9 @@ public class ClientManagerTest {
   }
 
   public void startServer() throws IOException {
-    metaServer = new ServerSocket(9003);
+    metaServer = new ServerSocket();
+    metaServer.setReuseAddress(true);
+    metaServer.bind(new InetSocketAddress(9003));
     metaServerListeningThread =
         new Thread(
             () -> {