1.6. JUnit 破坏红帽构建的 Apache Camel 版本 3.20 中的变化
在 Quarkus 3.20.1 中,JUnit 从 5.10 升级到 5.12。
此升级会改变注解方法的反映和继承的行为,因为使用了不同的搜索算法。
如果您的单元测试套件依赖于旧行为,您需要更改测试来考虑新的行为。
您可以通过设置 reflection 参数来使用新的 JUnit 版本模拟:
-Djunit.platform.reflection.search.useLegacySemantics=true
-Djunit.platform.reflection.search.useLegacySemantics=true
详情请查看 JUnit 5.11.0 发行文档中的新功能和改进部分。https://junit.org/junit5/docs/5.11.1/release-notes/#release-notes-5.11.0-junit-platform-deprecations-and-breaking-changes