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 committed Nov 21, 2023
1 parent 49c9bba commit fe7afba
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
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
2 changes: 1 addition & 1 deletion nbd

0 comments on commit fe7afba

Please sign in to comment.