mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 14:35:11 +01:00
Only scan org.bukkit.craftbukkit.inventory
in MetaHandledTagsTest
fixes tests OOMing
This commit is contained in:
parent
d93c6f91f7
commit
f187fd696a
1 changed files with 5 additions and 3 deletions
|
@ -729,10 +729,10 @@ index 100e9b72b1dac2deb956753b9a8097ba917236fa..0b11d5ea89539decd2f6c60c5b581bbd
|
||||||
@Test
|
@Test
|
||||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
|
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
|
new file mode 100644
|
||||||
index 0000000000000000000000000000000000000000..7dc898d1d383aef8a913059e4f5695b5cdc719de
|
index 0000000000000000000000000000000000000000..d9692972e3ad089885d43711b6a7fb3e96da59b1
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
|
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/MetaHandledTagsTest.java
|
||||||
@@ -0,0 +1,30 @@
|
@@ -0,0 +1,32 @@
|
||||||
+package org.bukkit.craftbukkit.inventory;
|
+package org.bukkit.craftbukkit.inventory;
|
||||||
+
|
+
|
||||||
+import io.github.classgraph.ClassGraph;
|
+import io.github.classgraph.ClassGraph;
|
||||||
|
@ -750,7 +750,9 @@ index 0000000000000000000000000000000000000000..7dc898d1d383aef8a913059e4f5695b5
|
||||||
+
|
+
|
||||||
+ @Test
|
+ @Test
|
||||||
+ public void checkAllMetasHaveHandledTags() {
|
+ 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());
|
+ final ClassInfoList subclasses = result.getSubclasses(CraftMetaItem.class.getName());
|
||||||
+ assertFalse(subclasses.isEmpty(), "found 0 sub types");
|
+ assertFalse(subclasses.isEmpty(), "found 0 sub types");
|
||||||
+ for (final ClassInfo subclass : subclasses) {
|
+ for (final ClassInfo subclass : subclasses) {
|
||||||
|
|
Loading…
Reference in a new issue