zookeeper-commits mailing list archives

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

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


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

commit f644f3d63e3d1efd3a977b2f4621734dfe617f31
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
---
 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 008bfdb..2006c45 100644
--- a/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
+++ b/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
@@ -669,15 +669,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);
@@ -1351,9 +1342,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);
 
@@ -1409,6 +1400,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