You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hx...@apache.org on 2020/11/06 02:27:46 UTC

[iotdb] branch test_travis updated: fast failed if port is not closed

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

hxd pushed a commit to branch test_travis
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/test_travis by this push:
     new 2ddedc9  fast failed if port is not closed
2ddedc9 is described below

commit 2ddedc9d135be8ef789791c97e6f86208c529365
Author: xiangdong huang <sa...@gmail.com>
AuthorDate: Fri Nov 6 10:24:59 2020 +0800

    fast failed if port is not closed
---
 server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java b/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
index 7c2e12c..8cbe16f 100644
--- a/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
+++ b/server/src/test/java/org/apache/iotdb/db/utils/EnvironmentUtils.java
@@ -49,6 +49,7 @@ import org.apache.iotdb.db.service.IoTDB;
 import org.apache.thrift.transport.TSocket;
 import org.apache.thrift.transport.TTransport;
 import org.apache.thrift.transport.TTransportException;
+import org.junit.Assert;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -93,6 +94,7 @@ public class EnvironmentUtils {
           transport.open();
           logger.error("stop daemon failed. 6667 can be connected now.");
           transport.close();
+          Assert.fail("stop daemon failed. 6667 can be connected now.");
         } catch (TTransportException e) {
         }
       }
@@ -103,6 +105,7 @@ public class EnvironmentUtils {
           transport.open();
           logger.error("stop Sync daemon failed. 5555 can be connected now.");
           transport.close();
+          Assert.fail("stop daemon failed. 6667 can be connected now.");
         } catch (TTransportException e) {
         }
       }
@@ -113,6 +116,7 @@ public class EnvironmentUtils {
         JMXConnector jmxConnector = JMXConnectorFactory.connect(url);
         logger.error("stop JMX failed. 31999 can be connected now.");
         jmxConnector.close();
+        Assert.fail("stop daemon failed. 6667 can be connected now.");
       } catch (IOException e) {
         //do nothing
       }
@@ -121,6 +125,7 @@ public class EnvironmentUtils {
       try {
         socket.connect(new InetSocketAddress("127.0.0.1", 8181), 100);
         logger.error("stop MetricService failed. 8181 can be connected now.");
+        Assert.fail("stop daemon failed. 6667 can be connected now.");
       } catch (Exception e) {
         //do nothing
       } finally {