This is an automated email from the ASF dual-hosted git repository.
kezhuw pushed a commit to branch branch-3.9
in repository https://gitbox.apache.org/repos/asf/zookeeper.git
The following commit(s) were added to refs/heads/branch-3.9 by this push:
new 37cd4c092 ZOOKEEPER-4733: non-return function error and asan error in
CPPUNIT TESTs (#2045)
37cd4c092 is described below
commit 37cd4c0923dbcc8e312968cb2e6ccd9590420b63
Author: whyer6 <[email protected]>
AuthorDate: Tue Sep 10 03:55:24 2024 -0700
ZOOKEEPER-4733: non-return function error and asan error in CPPUNIT TESTs
(#2045)
(cherry picked from commit 3c4e15ef8d1f9969bd69c545f2e88eefeec5cb93)
---
zookeeper-client/zookeeper-client-c/tests/TestReconfig.cc | 4 ++--
zookeeper-client/zookeeper-client-c/tests/ZooKeeperQuorumServer.cc | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/zookeeper-client/zookeeper-client-c/tests/TestReconfig.cc
b/zookeeper-client/zookeeper-client-c/tests/TestReconfig.cc
index 22f87e944..5ae9606b5 100644
--- a/zookeeper-client/zookeeper-client-c/tests/TestReconfig.cc
+++ b/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
diff --git a/zookeeper-client/zookeeper-client-c/tests/ZooKeeperQuorumServer.cc
b/zookeeper-client/zookeeper-client-c/tests/ZooKeeperQuorumServer.cc
index db79919c3..735486857 100644
--- a/zookeeper-client/zookeeper-client-c/tests/ZooKeeperQuorumServer.cc
+++ b/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::