In fact because the CoreSession Guice provider is installed in scope Singleton the same session is reused even if the
Granularity=METHOD is used in tets annotations.
This can lead to weird behavior.
This can be fixed by simply replacing:
protected <T> void bind0(Binder binder, Class<T> type, Provider<T> provider)
{ binder.bind(type).toProvider(provider).in(Scopes.SINGLETON); }with
protected <T> void bind0(Binder binder, Class<T> type, Provider<T> provider)
{ binder.bind(type).toProvider(provider); }in class org.nuxeo.runtime.test.runner.RuntimeFeature
but should be tested before to be sure existing tests are not broken by the modification
- depends on
-
NXP-8842 Make test core feature compatible with transactional feature
- Resolved