Actually, what I would like to create a test case that does:
- create a ClassLoader,
- test AOP on loaded classes
- release reference to the classLoader
- Verify if the class was loaded or not
So, if I create a regular URLClassLoader(WithAllTheClassPathINeed), would AOP still work, or should I do any playing with Agents/ClassLoaders?
If you are using loadtime aop you need to use either the SystemClassLoader or the -javaagent or -Xbootclasspath mechanisms.
The tests are in the main buiild.xml, which I have started some refactoring of to make it a more modular. There still is no one-test though
Don't you have an easier way to run individual tests?
I mean, I would expect you to use some low grain target to run your tests when you are developing. How do you run tests while developing?
I've added the two following targets:
They will run a single test in the "most common" mode. Note that the precompiled-test one will need a clean and recompile of the test classes if you want to run it again, so I guess the most useful is loadtime-test.
$ build.sh one-precompiled-test -Dtest=precedence
will run all the tests found under org.jboss.test.aop.precedence. (most org.jboss.test.aop directories have only one test)