You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a test suite where different test classes use the same context configuration file but different context loader. The use case for this is to be able to inject a session and request scope via the customizeBeanFactory method in the GenericXmlContextLoader class.
Since only some test cases rely on those scopes I have a @ContextConfiguration annotation on those classes that need those scopes.
Since the contextCache relies only on the locations property of the ContextConfiguration annotation the special context loader is not invoked if another test cases with the same context location has been executed before.
Could you please add the classname of the loader to the cache key as well? In Spring 3.0.2 it is in line 301 in the org.springframework.test.context.TestContext.java file.
Daniel IfCore opened SPR-7326 and commented
I have a test suite where different test classes use the same context configuration file but different context loader. The use case for this is to be able to inject a session and request scope via the customizeBeanFactory method in the GenericXmlContextLoader class.
Since only some test cases rely on those scopes I have a
@ContextConfiguration
annotation on those classes that need those scopes.Since the contextCache relies only on the locations property of the ContextConfiguration annotation the special context loader is not invoked if another test cases with the same context location has been executed before.
Could you please add the classname of the loader to the cache key as well? In Spring 3.0.2 it is in line 301 in the org.springframework.test.context.TestContext.java file.
Thanks!
Affects: 3.0.2
Issue Links:
Referenced from: commits dbe96b5, 3f58da1
The text was updated successfully, but these errors were encountered: