From d00a8dfb5cefcb9f01373b827a29718bd87cadd0 Mon Sep 17 00:00:00 2001 From: Peng Junzhi <201250214@smail.nju.edu.cn> Date: Tue, 29 Oct 2024 17:17:59 +0800 Subject: [PATCH] improve robustness --- .../org/apache/hugegraph/core/memory/MemoryManageTest.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/memory/MemoryManageTest.java b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/memory/MemoryManageTest.java index a508d26e5e..4855c09582 100644 --- a/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/memory/MemoryManageTest.java +++ b/hugegraph-server/hugegraph-test/src/main/java/org/apache/hugegraph/core/memory/MemoryManageTest.java @@ -20,6 +20,7 @@ import org.apache.hugegraph.memory.MemoryManager; import org.apache.hugegraph.memory.pool.MemoryPool; import org.apache.hugegraph.memory.pool.impl.TaskMemoryPool; +import org.apache.hugegraph.memory.util.RoundUtil; import org.apache.hugegraph.testutil.Assert; import org.apache.hugegraph.util.Bytes; import org.junit.After; @@ -70,6 +71,9 @@ public class MemoryManageTest { public void setUp() { memoryManager = MemoryManager.getInstance(); MemoryManager.setMemoryMode(MemoryManager.MemoryMode.ENABLE_OFF_HEAP_MANAGEMENT); + MemoryManager.setMaxMemoryCapacityInBytes(Bytes.GB); + MemoryManager.setMaxMemoryCapacityForOneQuery(Bytes.MB * 100); + RoundUtil.setAlignment(8); query1MemoryPool = memoryManager.addQueryMemoryPool(); query2MemoryPool = memoryManager.addQueryMemoryPool();