zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From an...@apache.org
Subject [zookeeper] branch branch-3.5 updated: ZOOKEEPER-3222: Flaky: multiple intermittent segfaults in C++ tests
Date Thu, 03 Jan 2019 14:58:10 GMT
This is an automated email from the ASF dual-hosted git repository.

andor pushed a commit to branch branch-3.5
in repository https://gitbox.apache.org/repos/asf/zookeeper.git


The following commit(s) were added to refs/heads/branch-3.5 by this push:
     new 94b18f7  ZOOKEEPER-3222: Flaky: multiple intermittent segfaults in C++ tests
94b18f7 is described below

commit 94b18f7e2a6701ba6b4d42334b84ef70d8708a03
Author: Andor Molnar <andor@cloudera.com>
AuthorDate: Thu Jan 3 15:57:39 2019 +0100

    ZOOKEEPER-3222: Flaky: multiple intermittent segfaults in C++ tests
    
    1. Removed the failing test case: client cannot be validated after closing.
    2. Explicitly close the client before creating new.
    
    Author: Andor Molnar <andor@cloudera.com>
    
    Reviewers: fangmin@apache.org, andor@apache.org
    
    Closes #740 from anmolnar/ZOOKEEPER-3222
    
    (cherry picked from commit f644f3d63e3d1efd3a977b2f4621734dfe617f31)
    Signed-off-by: Andor Molnar <andor@apache.org>
---
 zookeeper-client/zookeeper-client-c/tests/TestClient.cc | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/zookeeper-client/zookeeper-client-c/tests/TestClient.cc b/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
index 52ce92c..89bf856 100644
--- a/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
+++ b/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
@@ -658,15 +658,6 @@ public:
         CPPUNIT_ASSERT(count == 1);
         count  = 0;
         CPPUNIT_ASSERT_EQUAL((int) ZOK, zookeeper_close(zk_auth));
-        
-        // [ZOOKEEPER-800] zoo_add_auth should return ZINVALIDSTATE if
-        // the connection is closed. 
-        zhandle_t *zk2 = zookeeper_init(hostPorts, NULL, 10000, 0, NULL, 0);
-        sleep(1);
-        CPPUNIT_ASSERT_EQUAL((int) ZOK, zookeeper_close(zk2));
-        CPPUNIT_ASSERT_EQUAL(0, zoo_state(zk2)); // 0 ==> ZOO_CLOSED_STATE
-        rc = zoo_add_auth(zk2, "digest", "pat:passwd", 10, voidCompletion, (void*)ZOK);
-        CPPUNIT_ASSERT_EQUAL((int) ZINVALIDSTATE, rc);
 
         struct sockaddr addr;
         socklen_t addr_len = sizeof(addr);
@@ -1340,9 +1331,9 @@ public:
       int blen = sizeof(buf);		
       int rc;
       watchctx_t ctx;
-			zhandle_t *zk;
+      zhandle_t *zk;
 
-			/* setup path */
+      /* setup path */
       zk = createClient(&ctx);
       CPPUNIT_ASSERT(zk);
 
@@ -1398,6 +1389,8 @@ public:
                                watcher_rw, NULL, 0);
       CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS, rc);
 
+      zookeeper_close(zk);
+
       /* bring the server back */
       startServer();
       zk = createClient(&ctx);


Mime
View raw message