Переглянути джерело

ZOOKEEPER-4733: non-return function error and asan error in CPPUNIT TESTs (#2045)

whyer6 7 місяців тому
батько
коміт
3c4e15ef8d

+ 2 - 2
zookeeper-client/zookeeper-client-c/tests/TestReconfig.cc

@@ -499,7 +499,7 @@ public:
             found = seen.find(next.str());
             CPPUNIT_ASSERT_MESSAGE(next.str() + " in seen list",
                                    found == string::npos);
-            seen += found + ", ";
+            seen += next.str() + ", ";
         }
 
         // Now it should start connecting to the old servers
@@ -516,7 +516,7 @@ public:
             // Assert not in seen list then append
             found = seen.find(next.str());
             CPPUNIT_ASSERT(found == string::npos);
-            seen += found + ", ";
+            seen += next.str() + ", ";
         }
 
         // NOW it goes back to normal as we've tried all the new and old

+ 1 - 0
zookeeper-client/zookeeper-client-c/tests/ZooKeeperQuorumServer.cc

@@ -197,6 +197,7 @@ getCluster(uint32_t numServers) {
         }
     }
     assert(!"The cluster didn't start for 10 seconds");
+    return {};
 }
 
 std::vector<ZooKeeperQuorumServer*> ZooKeeperQuorumServer::