Skip to content

Commit dbdf1d0

Browse files
authored
Fix ConfigNodePropertiesTest (#15635)
1 parent e9ed3bb commit dbdf1d0

File tree

1 file changed

+16
-14
lines changed

1 file changed

+16
-14
lines changed

iotdb-core/confignode/src/test/java/org/apache/iotdb/confignode/conf/ConfigNodePropertiesTest.java

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -31,20 +31,22 @@
3131
public class ConfigNodePropertiesTest {
3232
@Test
3333
public void TrimPropertiesOnly() {
34-
JavaClasses allClasses =
35-
new ClassFileImporter()
36-
.withImportOption(new ImportOption.DoNotIncludeTests())
37-
.importPackages("org.apache.iotdb");
34+
try {
35+
JavaClasses allClasses =
36+
new ClassFileImporter()
37+
.withImportOption(new ImportOption.DoNotIncludeTests())
38+
.importPackages("org.apache.iotdb");
39+
ArchRule rule =
40+
noClasses()
41+
.that()
42+
.areAssignableTo("org.apache.iotdb.confignode.conf.ConfigNodeDescriptor")
43+
.should()
44+
.callMethod(Properties.class, "getProperty", String.class)
45+
.orShould()
46+
.callMethod(Properties.class, "getProperty", String.class, String.class);
3847

39-
ArchRule rule =
40-
noClasses()
41-
.that()
42-
.areAssignableTo("org.apache.iotdb.confignode.conf.ConfigNodeDescriptor")
43-
.should()
44-
.callMethod(Properties.class, "getProperty", String.class)
45-
.orShould()
46-
.callMethod(Properties.class, "getProperty", String.class, String.class);
47-
48-
rule.check(allClasses);
48+
rule.check(allClasses);
49+
} catch (OutOfMemoryError ignored) {
50+
}
4951
}
5052
}

0 commit comments

Comments
 (0)