This is an automated email from the ASF dual-hosted git repository.

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new feec68396ef branch-3.0: [fix](memory) Fix UT `ThreadMemTrackerMgrTest` 
#44147 (#44935)
feec68396ef is described below

commit feec68396efe200665379b3dcc74a45459e6a08f
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Wed Dec 4 09:58:46 2024 +0800

    branch-3.0: [fix](memory) Fix UT `ThreadMemTrackerMgrTest` #44147 (#44935)
    
    Cherry-picked from #44147
    
    Co-authored-by: Xinyi Zou <zouxi...@selectdb.com>
---
 be/test/runtime/memory/thread_mem_tracker_mgr_test.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/be/test/runtime/memory/thread_mem_tracker_mgr_test.cpp 
b/be/test/runtime/memory/thread_mem_tracker_mgr_test.cpp
index fad2116fca7..073071ca986 100644
--- a/be/test/runtime/memory/thread_mem_tracker_mgr_test.cpp
+++ b/be/test/runtime/memory/thread_mem_tracker_mgr_test.cpp
@@ -231,7 +231,7 @@ TEST_F(ThreadMemTrackerMgrTest, ReserveMemory) {
 
     int64_t size1 = 4 * 1024;
     int64_t size2 = 4 * 1024 * 1024;
-    int64_t size3 = size2 * 1024;
+    int64_t size3 = size2 * 2;
 
     thread_context->attach_task(TUniqueId(), t, workload_group);
     thread_context->consume_memory(size1);
@@ -255,7 +255,7 @@ TEST_F(ThreadMemTrackerMgrTest, ReserveMemory) {
     // std::abs(-size1 - size1) < SYNC_PROC_RESERVED_INTERVAL_BYTES, not 
update process_reserved_memory.
     EXPECT_EQ(doris::GlobalMemoryArbitrator::process_reserved_memory(), size3 
- size2);
 
-    thread_context->consume_memory(size2 * 1023);
+    thread_context->consume_memory(size2);
     EXPECT_EQ(t->consumption(), size1 + size2 + size3);
     EXPECT_EQ(doris::GlobalMemoryArbitrator::process_reserved_memory(), size1 
+ size1);
 
@@ -382,7 +382,7 @@ TEST_F(ThreadMemTrackerMgrTest, 
NestedSwitchMemTrackerReserveMemory) {
 
     int64_t size1 = 4 * 1024;
     int64_t size2 = 4 * 1024 * 1024;
-    int64_t size3 = size2 * 1024;
+    int64_t size3 = size2 * 2;
 
     thread_context->attach_task(TUniqueId(), t1, workload_group);
     auto st = thread_context->try_reserve_memory(size3);


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

Reply via email to