Terasology / SimpleFarming

Easy to understand growing of foods
11 stars 27 forks source link

MTE tests fail to resolve required modules #108

Closed keturn closed 3 years ago

keturn commented 3 years ago

The tests fail with the message

java.lang.IllegalStateException: Modules only available if resolution was successful

  • at com.google.common.base.Preconditions.checkState(Preconditions.java:459)
  • at org.terasology.module.ResolutionResult.getModules(ResolutionResult.java:47)
  • at o.t.mte.TestingStateHeadlessSetup.createGameManifest(TestingStateHeadlessSetup.java:70)
  • at o.t.engine.subsystem.headless.mode.StateHeadlessSetup.init(StateHeadlessSetup.java:112)
  • at o.t.engine.TerasologyEngine.switchState(TerasologyEngine.java:584)
  • at o.t.engine.TerasologyEngine.changeState(TerasologyEngine.java:567)
  • at o.t.mte.ModuleTestingEnvironment.createHost(ModuleTestingEnvironment.java:459)
  • at o.t.mte.ModuleTestingEnvironment.setup(ModuleTestingEnvironment.java:168)
  • at o.t.mte.MTEExtension.beforeAll(MTEExtension.java:85)

SimpleFarming probably isn't the only one with this problem, but I'll use this until we know better.

keturn commented 3 years ago

After hacking gestalt-module a bit, I suspect the module resolver isn't being met with 100% failure, and that it's specifically OreGeneration and FlowingLiquids that it is failing to provide compatible versions for.

No idea yet why those two in particular.

keturn commented 3 years ago

https://github.com/MovingBlocks/Terasology/pull/4479 addresses something that might be related.

skaldarnar commented 3 years ago

When running the tests locally only 4 (instead of 5) tests fail for me, each with a NullPointerException instead of the module resolution error:

image

This might, however, be just a different incarnation of the same problem... :thinking:

java.lang.NullPointerException
    at org.terasology.simpleFarming.systems.BushAuthoritySystemTest.bushShouldGrowInOrder(BushAuthoritySystemTest.java:69)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    ...
keturn commented 3 years ago

addressed by changes to MTE and ModuleManager