hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ph...@apache.org
Subject svn commit: r777413 - in /hadoop/zookeeper/trunk: CHANGES.txt src/c/tests/TestClient.cc
Date Fri, 22 May 2009 07:25:21 GMT
Author: phunt
Date: Fri May 22 07:25:21 2009
New Revision: 777413

URL: http://svn.apache.org/viewvc?rev=777413&view=rev
Log:
ZOOKEEPER-415. zookeeper c tests hang.

Modified:
    hadoop/zookeeper/trunk/CHANGES.txt
    hadoop/zookeeper/trunk/src/c/tests/TestClient.cc

Modified: hadoop/zookeeper/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/CHANGES.txt?rev=777413&r1=777412&r2=777413&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/CHANGES.txt (original)
+++ hadoop/zookeeper/trunk/CHANGES.txt Fri May 22 07:25:21 2009
@@ -92,6 +92,8 @@
   ZOOKEEPER-402. zookeeper c library segfaults on data for a node in zookeeper
   being null. (mahadev via phunt)
 
+  ZOOKEEPER-415. zookeeper c tests hang. (mahadev via phunt)
+
 IMPROVEMENTS:
   ZOOKEEPER-308. improve the atomic broadcast performance 3x.
   (breed via mahadev)

Modified: hadoop/zookeeper/trunk/src/c/tests/TestClient.cc
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/c/tests/TestClient.cc?rev=777413&r1=777412&r2=777413&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/c/tests/TestClient.cc (original)
+++ hadoop/zookeeper/trunk/src/c/tests/TestClient.cc Fri May 22 07:25:21 2009
@@ -116,6 +116,7 @@
     evt_t getEvent() {
         evt_t evt;
         mutex.acquire();
+        CPPUNIT_ASSERT( events.size() > 0);
         evt = events.front();
         events.pop_front();
         mutex.release();
@@ -602,11 +603,13 @@
         CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHANGED_EVENT, evt.type);
         CPPUNIT_ASSERT_EQUAL(string("/watchtest/child"), evt.path);
 
+        CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
         // The create will trigget the get children and the
         // exists watches
         evt = ctxLocal->getEvent();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CREATED_EVENT, evt.type);
         CPPUNIT_ASSERT_EQUAL(string("/watchtest/child2"), evt.path);
+        CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
         evt = ctxLocal->getEvent();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type);
         CPPUNIT_ASSERT_EQUAL(string("/watchtest"), evt.path);
@@ -653,7 +656,8 @@
         evt = ctxLocal->getEvent();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_DELETED_EVENT, evt.type);
         CPPUNIT_ASSERT_EQUAL(string("/watchtest/child2"), evt.path);
-
+        
+        CPPUNIT_ASSERT_MESSAGE(testName, waitForEvent(zk, ctxLocal, 5));
         evt = ctxLocal->getEvent();
         CPPUNIT_ASSERT_EQUAL_MESSAGE(evt.path, ZOO_CHILD_EVENT, evt.type);
         CPPUNIT_ASSERT_EQUAL(string("/watchtest"), evt.path);



Mime
View raw message