Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: curvefs/metaserver ut crash when compiling with release mode #2921

Merged
merged 1 commit into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions curvefs/test/metaserver/storage/dumpfile_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ namespace storage {

using Hash = std::unordered_map<std::string, std::string>;

namespace {
class HashIterator : public Iterator {
public:
explicit HashIterator(Hash* hash)
Expand All @@ -56,6 +57,7 @@ class HashIterator : public Iterator {
Hash::iterator iter_;
Hash* hash_;
};
} // namespace

class DumpFileTest : public ::testing::Test {
protected:
Expand Down
3 changes: 2 additions & 1 deletion curvefs/test/metaserver/storage/iterator_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ namespace storage {

using Hash = std::unordered_map<std::string, std::string>;
using ContainerType = std::map<std::string, std::string>;
using google::protobuf::util::MessageDifferencer;

namespace {
class HashIterator : public Iterator {
public:
explicit HashIterator(Hash* hash)
Expand All @@ -58,6 +58,7 @@ class HashIterator : public Iterator {
Hash* hash_;
Hash::iterator iter_;
};
} // namespace

class IteratorTest : public ::testing::Test {
protected:
Expand Down