Community
Participate
Working Groups
The XtextRunner caches all InjectorProvider in a static variable. If your InjectorProvider has a state, like the Injector or the GlobalStateMemento, this leads to growing memory consumption if you call many tests in one JVM. The possibility of side effects between tests in this case is also higher, because you could get an InjectorProvider from a test which ran before. The InjectorProvider should not be cached over different TestClasses or get a method, like AfterClass in JUnit, to be able to clean the internal state.
The idea is to reuse the injector to speed up execution. As it is a provider, you could have an implementation which doesn't hold the injector internally, but create a fresh one each time getInjector() is called. Doesn't that work for you?
please reopen, if I missed something
Closing all bugs that were set to RESOLVED before Neon.0