zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] asfgit closed pull request #740: ZOOKEEPER-3222. Flaky: multiple intermittent segfaults in C++ tests
Date Thu, 03 Jan 2019 14:58:11 GMT
asfgit closed pull request #740: ZOOKEEPER-3222. Flaky: multiple intermittent segfaults in
C++ tests
URL: https://github.com/apache/zookeeper/pull/740
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/zookeeper-client/zookeeper-client-c/tests/TestClient.cc b/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
index 008bfdbf83..2006c45878 100644
--- a/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
+++ b/zookeeper-client/zookeeper-client-c/tests/TestClient.cc
@@ -669,15 +669,6 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
         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 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
       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 @@ class Zookeeper_simpleSystem : public CPPUNIT_NS::TestFixture
                                watcher_rw, NULL, 0);
       CPPUNIT_ASSERT_EQUAL((int)ZCONNECTIONLOSS, rc);
 
+      zookeeper_close(zk);
+
       /* bring the server back */
       startServer();
       zk = createClient(&ctx);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message