Closed sbabcoc closed 7 months ago
I've been tracing through the execution, and the JUnit Foundation method interceptors aren't getting called for some reason. Without those being invoked, the lifecycle handlers fail.
Yup... it's Gradle, which is apparently using JUnit directly to execute the tests. By the time the agent runs, all of the classes I need to add hooks to have been loaded into the class cache, which means that the agent accomplishes precisely nothing. I'm searching the interweb for a way to configure Gradle to run the tests like Maven does - in a separate thread with its own class loader.
I upgraded JUnit Foundation to the latest Byte Buddy, and this appears to do the trick.
It appears that support for JUnit 4 got broken at some point. It's possible that I'm just not formulating the commands or JVM arguments properly, but the RunListener doesn't appear to be firing events anymore.