chore(core): 去除冗余的 surefire benchmark-conf 配置#537
Merged
Conversation
BenchmarkTestBase (#536) sets the benchmark-conf system property before ConfigDescriptor loads, and every config-touching test extends it, so the surefire systemPropertyVariables added in #529 is redundant: in `mvn test` it merely shadows BenchmarkTestBase's setter (making the latter a no-op), while BenchmarkTestBase additionally covers IDE runs. Remove the surefire plugin block (the only plugin left after JaCoCo was dropped), leaving BenchmarkTestBase as the single mechanism.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
内容
构建 / 测试基建去重,无业务代码改动。
function.xml缺失导致Config.initInnerFunction()调System.exit(0)把 surefire fork 杀掉的问题,现在有两套修复并存:core/pom.xml用 surefire<systemPropertyVariables><benchmark-conf>设置(仅mvn test生效,但覆盖所有测试)。BenchmarkTestBase静态块用System.setProperty(... if==null)设置(maven + IDE 都生效,覆盖继承它的测试)。所有会触发
ConfigDescriptor的测试都已extends BenchmarkTestBase,不继承它的测试根本不碰ConfigDescriptor。在mvn test里 surefire 在 JVM 启动就设好属性,使BenchmarkTestBase的if==null永远为 false(成了 no-op)。即两套机制做同一件事,且BenchmarkTestBase更完整(额外覆盖 IDE)。本 PR 删除
core/pom.xml里的 surefire 插件块(JaCoCo 移除后它已是唯一插件),保留BenchmarkTestBase作为单一机制。验证
mvn test -pl core:38 tests 通过(默认顺序与 alphabetical 均通过)。mvn spotless:check -pl core:clean。