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

haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new dbdf1d02c8b Fix ConfigNodePropertiesTest (#15635)
dbdf1d02c8b is described below

commit dbdf1d02c8b015980568139ec6e9980dc9bb0386
Author: Haonan <hhao...@outlook.com>
AuthorDate: Tue Jun 3 17:52:31 2025 +0800

    Fix ConfigNodePropertiesTest (#15635)
---
 .../confignode/conf/ConfigNodePropertiesTest.java  | 30 ++++++++++++----------
 1 file changed, 16 insertions(+), 14 deletions(-)

diff --git 
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/conf/ConfigNodePropertiesTest.java
 
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/conf/ConfigNodePropertiesTest.java
index 1101fcc3f11..4dbddddd3c0 100644
--- 
a/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/conf/ConfigNodePropertiesTest.java
+++ 
b/iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/conf/ConfigNodePropertiesTest.java
@@ -31,20 +31,22 @@ import static 
com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;
 public class ConfigNodePropertiesTest {
   @Test
   public void TrimPropertiesOnly() {
-    JavaClasses allClasses =
-        new ClassFileImporter()
-            .withImportOption(new ImportOption.DoNotIncludeTests())
-            .importPackages("org.apache.iotdb");
+    try {
+      JavaClasses allClasses =
+          new ClassFileImporter()
+              .withImportOption(new ImportOption.DoNotIncludeTests())
+              .importPackages("org.apache.iotdb");
+      ArchRule rule =
+          noClasses()
+              .that()
+              
.areAssignableTo("org.apache.iotdb.confignode.conf.ConfigNodeDescriptor")
+              .should()
+              .callMethod(Properties.class, "getProperty", String.class)
+              .orShould()
+              .callMethod(Properties.class, "getProperty", String.class, 
String.class);
 
-    ArchRule rule =
-        noClasses()
-            .that()
-            
.areAssignableTo("org.apache.iotdb.confignode.conf.ConfigNodeDescriptor")
-            .should()
-            .callMethod(Properties.class, "getProperty", String.class)
-            .orShould()
-            .callMethod(Properties.class, "getProperty", String.class, 
String.class);
-
-    rule.check(allClasses);
+      rule.check(allClasses);
+    } catch (OutOfMemoryError ignored) {
+    }
   }
 }

Reply via email to