Adib Saikali opened SPR-9938 and commented

Status Quo

When executing integration tests with a Spring ApplicationContext that uses load-time weaving, each test must be passed a command-line argument referencing the location of the Spring load-time weaving agent, for example:

-javaagent:jars/org.springframework.instrument-3.1.2.RELEASE.jar

The Spring Tomcat LTW configuration does not require any command-line arguments, because it uses a transforming class loader.

Proposal

If the Spring TestContext Framework (TCF) can be configured to use a transforming class loader like the one that already ships for Tomcat, then running an integration test would be much easier.

Perhaps an @LoadTimeWeaving annotation can be introduced to instruct the TCF to automatically configure the transforming class loader for load-time weaving when the ApplicationContext is created for the test.


Affects: 3.1 GA

1 votes, 3 watchers