Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run JUnit tests #208

Open
mezz opened this issue Jun 14, 2024 · 0 comments
Open

Cannot run JUnit tests #208

mezz opened this issue Jun 14, 2024 · 0 comments

Comments

@mezz
Copy link
Contributor

mezz commented Jun 14, 2024

This might be a bug, or it might be user error, I am not sure.
I couldn't find the right way to run JUnit tests with NeoGradle.

Previously, I had a hack in my gradle code that allowed them to run, but I had to remove it in order to publish non-fat jars to maven.
mezz/JustEnoughItems@e74e8e2#diff-17b5346b7751d307bcff68a78a64a459432c4fea0cad7f58903e6e8cee8c21d8L58-L71

Without that, I run into an issue when running ./gradlew :NeoForge:test:

Caused by: net.neoforged.fml.ModLoadingException: Loading errors encountered:
    - Just Enough Items (jei) encountered an error while dispatching the net.neoforged.neoforge.network.event.RegisterPayloadHandlersEvent event
      java.lang.LinkageError: loader constraint violation: loader 'app' wants to load class net.minecraft.server.level.ServerPlayer. A different class with the same name was previously loaded by 'TRANSFORMER' @4a058df8. (net.minecraft.server.level.ServerPlayer is in module [email protected] of loader 'TRANSFORMER' @4a058df8, parent loader 'bootstrap')

longer log: https://gist.github.com/mezz/cf261ae3a0e25246c727740fc03227b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant