Only scan org.bukkit.craftbukkit.inventory in MetaHandledTagsTest

fixes tests OOMing
This commit is contained in:
Jason Penilla 2024-04-27 18:25:15 -07:00
parent d93c6f91f7
commit f187fd696a
No known key found for this signature in database
GPG key ID: 0E75A301420E48F8

View file

@ -729,10 +729,10 @@ index 100e9b72b1dac2deb956753b9a8097ba917236fa..0b11d5ea89539decd2f6c60c5b581bbd
@Test
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
new file mode 100644
index 0000000000000000000000000000000000000000..7dc898d1d383aef8a913059e4f5695b5cdc719de
index 0000000000000000000000000000000000000000..d9692972e3ad089885d43711b6a7fb3e96da59b1
--- /dev/null
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
@@ -0,0 +1,30 @@
@@ -0,0 +1,32 @@
+package org.bukkit.craftbukkit.inventory;
+
+import io.github.classgraph.ClassGraph;
@ -750,7 +750,9 @@ index 0000000000000000000000000000000000000000..7dc898d1d383aef8a913059e4f5695b5
+
+ @Test
+ public void checkAllMetasHaveHandledTags() {
+ try (final ScanResult result = new ClassGraph().enableAllInfo().scan()) {
+ try (final ScanResult result = new ClassGraph()
+ .whitelistPackages("org.bukkit.craftbukkit.inventory")
+ .enableAllInfo().scan()) {
+ final ClassInfoList subclasses = result.getSubclasses(CraftMetaItem.class.getName());
+ assertFalse(subclasses.isEmpty(), "found 0 sub types");
+ for (final ClassInfo subclass : subclasses) {