Allow a TestExecutionListener to configure the ApplicationContext [SPR-5185] #9858
Labels
in: test
Issues in the test module
status: declined
A suggestion or change that we don't feel we should currently apply
type: enhancement
A general enhancement
Tuomas Kiviaho opened SPR-5185 and commented
Status Quo
Currently the application context gets refreshed by the loader itself. So the only option to configure the
XmlBeanDefinitionReader
,PassthoughSourceExtrator
, etc. without a double refresh is to extend or implement aContextLoader
.Proposal
A
ContextLoader
could return a non-refreshedApplicationContext
to theTestContextManager
and leave refreshing to a new configurable application context awareTestExecutionListener
that would ensure that theApplicationContext
has been properly initialized before test methods and refresh it as needed or every time (based on the presence of the@DirtiesContext
annotation).Affects: 2.5.5
Attachments:
3 votes, 4 watchers
The text was updated successfully, but these errors were encountered: