You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2021/03/11 05:45:17 UTC

[GitHub] [incubator-doris] acelyc111 commented on a change in pull request #5501: [UT] fix memory tracker ut

acelyc111 commented on a change in pull request #5501:
URL: https://github.com/apache/incubator-doris/pull/5501#discussion_r592080553



##########
File path: be/test/runtime/mem_limit_test.cpp
##########
@@ -23,89 +23,43 @@
 
 namespace doris {
 
-TEST(MemTestTest, SingleTrackerNoLimit) {
-    MemTracker t(-1);
-    EXPECT_FALSE(t.has_limit());
-    t.Consume(10);
-    EXPECT_EQ(t.consumption(), 10);
-    t.Consume(10);
-    EXPECT_EQ(t.consumption(), 20);
-    t.Release(15);
-    EXPECT_EQ(t.consumption(), 5);
-    EXPECT_FALSE(t.LimitExceeded(MemLimit::HARD));
-}
+class MemTrackerTest : public testing::Test {
+public:
+    MemTrackerTest() {}
+};

Review comment:
       Coz you are using `TEST`  only, so this class is not necessary?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org