Skip to content

Commit

Permalink
fix: curvefs/metaserver ut crash when compiling with release mode
Browse files Browse the repository at this point in the history
Signed-off-by: Ziy1-Tan <[email protected]>
  • Loading branch information
Ziy1-Tan authored and SeanHai committed Nov 30, 2023
1 parent 61c8cbe commit 1278ff2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
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

0 comments on commit 1278ff2

Please sign in to comment.