-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MTE tests are broken after gestalt v7 migration #4757
MTE tests are broken after gestalt v7 migration #4757
Comments
In the first case, where EnvironmentSwitchHandler.registerComponents throws "Could not find module for MappedType class o.t.unittest.stubs.MappedTypeComponent," It looks like that ModuleManager.environment is in its default engine-module-only state, the other modules named in the test class's I think the thing to investigate here is to compare to the integration tests in |
Well, I think the reason that engine-test's TerasologyTestingEnvironment and HeadlessEnvironment don't have that same failure in They've got gobs of initialization code that's essentially a parallel implementation of the stuff that TerasologyEngine.initialize does, but with mocks and whatnot sprinkled in. But it looks like it should end up at some of the same register-component code, e.g. from HeadlessEnvironment's call of |
This is some of the engine initialization: Terasology/engine/src/main/java/org/terasology/engine/core/TerasologyEngine.java Lines 217 to 231 in 86606d1
here's one idea: make an engine-test subsystem that registers its weird unittest module. Because That handleSwitchToGameEnvironment method kinda stands out. I find it dates back to 1860861, when it was named The thing that's bugging me is that I don't understand why this "switch to game environment" code is being run this early. We haven't selected game modules yet, so I'm not sure why we're doing all this stuff that depends on the module environment. It is called again when we go to actually load a game. Is it required to load assets that are part of the GUI or something like that? |
Just did a quick
On MTE or on TTE side? If on TTE, should me maybe just add that to the setup on MTE, too? |
Indeed, I was wrong about that. engine-tests does not use TerasologyEngine for TTE after all.
TTE has customized its setup. MTE can't do so in exactly the same way because MTE doesn't have its own version of all those initialization methods; it lets TerasologyEngine do that. |
So TTE does not let TerasologyEngine do it, but does it in a customized way? |
Yep. I don't know how far TTE has diverged from TerasologyEngine, but given how much code there is, I assume it has diverged and will only widen as time goes on. One of the ways that we have of parameterizing Engine is with subsystems. That's one idea I came up with yesterday but I don't know if it's a good idea. I think it would be sufficient for this particular failure we're having at the moment. Of course, it would be nice if the steps we take for this failure are steps toward fixing the problem of all TTE's potentially-divergent code, and I haven't thought that far ahead. Another option would be to make the unittest module less of quirky thing. Put it in |
I'd like to ping @DarkWeird on that one.
This kind of bring me back to the idea of a "developer tooling" distro we talked about a while ago. Basically a distro where modules for testing such as MTE or modules adding debug tooling or so could live... |
All this talk about diverging code makes me wonder
|
Yes, that's the subject of #4545. But for the issue at hand, the TTE tests are the ones that are passing, so removing it for the sake of de-duplication won't get us out of the current mess. I'm going to try implementing the subsystem thing I suggested in #4757 (comment) |
Currently the module integration tests using Module Testing Environment (MTE) are all broken.
Locally, they fail with a
VerifyException
as the testing environment is unable to find a module for a sepcific component. As far as I can observe, this is not always the same component, but the stacktrace looks quite similar every time.In CI, the tests also fail but with a different error message. For instance, in Health build #62 the tests fail with a
NoClassDefFoundError
forPathManager
.The text was updated successfully, but these errors were encountered: