In JUnit4 tests when using CoreFeature - Granularity=METHOD is not working as
expected
--------------------------------------------------------------------------------------
Key: NXP-7227
URL: https://jira.nuxeo.com/browse/NXP-7227
Project: Nuxeo Enterprise Platform
Issue Type: Bug
Reporter: Bogdan Stefanescu
Assignee: Bogdan Stefanescu
Priority: Major
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
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets