Skip to content

chore(core): 去除冗余的 surefire benchmark-conf 配置#537

Merged
SpriCoder merged 1 commit into
masterfrom
chore/dedup-benchmark-conf-surefire
May 25, 2026
Merged

chore(core): 去除冗余的 surefire benchmark-conf 配置#537
SpriCoder merged 1 commit into
masterfrom
chore/dedup-benchmark-conf-surefire

Conversation

@SpriCoder
Copy link
Copy Markdown
Collaborator

内容

构建 / 测试基建去重,无业务代码改动。

function.xml 缺失导致 Config.initInnerFunction()System.exit(0) 把 surefire fork 杀掉的问题,现在有两套修复并存:

所有会触发 ConfigDescriptor 的测试都已 extends BenchmarkTestBase,不继承它的测试根本不碰 ConfigDescriptor。在 mvn test 里 surefire 在 JVM 启动就设好属性,使 BenchmarkTestBaseif==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。

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.
@SpriCoder SpriCoder merged commit 3120374 into master May 25, 2026
2 checks passed
@SpriCoder SpriCoder deleted the chore/dedup-benchmark-conf-surefire branch May 25, 2026 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant