Skip to content

Commit d3361d2

Browse files
committed
Add execution, per Clement suggestion
1 parent 3096c9d commit d3361d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

_posts/2025-04-22-test-classloading-rewrite.adoc

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ However, some use cases didn't work. Tests using advanced JUnit 5 features like
2626

2727
While Quarkus extensions can do all sorts of marvellous bytecode manipulation to improve the developer experience, they cannot manipulate test classes with the same freedom that they do normal application classes.
2828

29-
Over time, test-related defects were building up that couldn't be changed without a fundamental rewrite of test classloading. The Quarkus test code itself was also growing ever-more complex as it tried to work around various JUnit edge cases. Moving test instances from one classloader to another involved serializing and deserialization, which is harder to implement on newer JVM versions with tighter class security. For example, Quarkus used to use XStream as the serialization provider, but XStream no longer works with Java 17 and higher, because of reflection restrictions in the newer JVMs.
29+
Over time, test-related defects were building up that couldn't be changed without a fundamental rewrite of how Quarkus loads and executes tests.
30+
The Quarkus test code itself was also growing ever-more complex as it tried to work around various JUnit edge cases. Moving test instances from one classloader to another involved serializing and deserialization, which is harder to implement on newer JVM versions with tighter class security. For example, Quarkus used to use XStream as the serialization provider, but XStream no longer works with Java 17 and higher, because of reflection restrictions in the newer JVMs.
3031

3132
What if, instead, Quarkus tests were simply run in the same classloader used to to load them?
3233

0 commit comments

Comments
 (0)