Skip to content

fix(channel): 修复发布构建中的测试跳过冲突 - #4112

Merged
binarywang merged 1 commit into
developfrom
fix/miniapp-surefire-skip
Aug 22, 2026
Merged

fix(channel): 修复发布构建中的测试跳过冲突#4112
binarywang merged 1 commit into
developfrom
fix/miniapp-surefire-skip

Conversation

@binarywang

@binarywang binarywang commented Aug 22, 2026

Copy link
Copy Markdown
Owner

问题

发布工作流使用 -Dmaven.test.skip=true 跳过测试编译,但 channel 模块固定 Surefire 的 <skip>false</skip>,导致 TestNG 执行 suite 时找不到未编译的 WxChannelProductManagementServiceImplTest

修复

让 Surefire 的 skip 读取 ${maven.test.skip},使发布流程一致跳过测试编译与执行;常规构建仍运行对应 TestNG suite。

验证

  • mvn -pl weixin-java-channel clean test -Dmaven.test.skip=true -Dgpg.skip=true --no-transfer-progress
  • mvn -pl weixin-java-channel -am clean test -Dgpg.skip=true --no-transfer-progress(56 tests, 0 failures)

@binarywang
binarywang marked this pull request as ready for review August 22, 2026 14:02
Copilot AI lite review requested due to automatic review settings August 22, 2026 14:02
@augmentcode

augmentcode Bot commented Aug 22, 2026

Copy link
Copy Markdown
🤖 Augment PR Summary

总结:将 Channel 模块 Surefire 的 skip 从固定 false 改为读取 ${maven.test.skip}

目的:使发布使用 -Dmaven.test.skip=true 时测试编译与 TestNG suite 一致跳过,未设置该属性时仍运行模块测试。

🤖 Was this summary useful? React with 👍 or 👎

@augmentcode augmentcode Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review completed. No suggestions at this time.

Comment augment review to trigger a new review at any time.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

变更范围小且与仓库内其他模块(如 miniapp)已采用的 Surefire 跳过配置保持一致,能直接解决发布构建中的确定性失败场景。

Pull request overview

该 PR 聚焦修复 weixin-java-channel 模块在发布构建中使用 -Dmaven.test.skip=true 时的测试跳过行为冲突:此前 Surefire 被强制 <skip>false</skip>,会在测试未编译的情况下仍尝试执行 TestNG suite,导致类找不到的问题。改动使该模块与发布工作流的测试跳过语义保持一致,同时不影响默认情况下按 suite 运行测试。

Changes:

  • weixin-java-channelmaven-surefire-plugin 配置从硬编码 skip=false 调整为读取 ${maven.test.skip}
  • 使 -Dmaven.test.skip=true 能同时一致跳过测试编译与执行,避免发布流程中 TestNG suite 触发类缺失错误。
File summaries
File Description
weixin-java-channel/pom.xml 将 Surefire 的 skip 改为读取 ${maven.test.skip},修复发布构建测试跳过语义不一致导致的 suite 执行失败
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@binarywang
binarywang merged commit bb67825 into develop Aug 22, 2026
2 checks passed
@binarywang
binarywang deleted the fix/miniapp-surefire-skip branch August 22, 2026 14:05
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.

2 participants