Skip to content

#AI commit# 测试阶段:修复单元测试 - #1089

Open
v-kkhuang wants to merge 5 commits into
dev-2.1.0-webankfrom
dev-2.1.0-fix-github-action
Open

#AI commit# 测试阶段:修复单元测试#1089
v-kkhuang wants to merge 5 commits into
dev-2.1.0-webankfrom
dev-2.1.0-fix-github-action

Conversation

@v-kkhuang

Copy link
Copy Markdown

What is the purpose of the change

EngineConn-Core defines the the abstractions and interfaces of the EngineConn core functions.
The Engine Service in Linkis 0.x is refactored, EngineConn will handle the engine connection
and session management.

Related issues/PRs

Related issues: close #590 close #591
Related pr:#591

Brief change log

  • Define the core abstraction and interfaces of the EngineConn Factory;
  • Define the core abstraction and interfaces of Executor Manager.

Checklist

  • I have read the Contributing Guidelines on pull requests.
  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the Linkis mailing list first)
  • If this is a code change: I have written unit tests to fully verify the new behavior.

…失败单元测试

1. build-frontend/codeql-analysis/publish-docker workflow 升级 actions/cache@v2 -> @v4
   v2 已被 GitHub hard deprecate,使用该 action 的 workflow 会被强制失败
2. DateTypeUtilsTest 修正 2 个计算错误的期望值
   - testWeekType_Subtract_7_Weeks: 20260406 减 7 周(49天) 应为 20260216(原期望 20251124 差约 3 个月)
   - testCustomWeekType_IsEnd_Preservation: 20260412 减 1 周应为 20260405(原期望 20260329 差 1 周)
3. SecurityUtilsTest.testRSA 在 @BeforeAll 注入随机生成的 RSA 密钥对
   CI 环境默认 linkis.rsa.public/private.key 为空,导致 InvalidKeySpecException

本地验证 linkis-common 模块 39 个测试全通过。
…试期望值

1. build-frontend.yml: preinstall hook 调用 wnpm(Webank 内部 npm 包装器,公网 runner 不可用)
   改用 npm install --ignore-scripts 跳过 lifecycle scripts,手动 npx npm-force-resolutions
   应用 resolutions 字段(postcss 8.4.21)
2. LinkisStorageConfTest.collectMaxBytesDefault: 期望值 524288000(500m) -> 1073741824(1g)
   commit 107b21e 把默认值从 500m 改回 1g,测试期望未同步更新
…tionContext 加载失败

zookeeper 3.8.6 传递引入了 logback-core/logback-classic,与 linkis-common
声明的 log4j-slf4j-impl(2.17.2) 冲突。Spring Boot 测试启动时检测到两者
共存即抛 IllegalArgumentException: LoggerFactory is not a Logback
LoggerContext but Logback is on the classpath,导致所有 @SpringBootTest
测试(TaskDaoTest/VersionDaoTest/BmlProjectDaoTest 等)全部失败。

在父 pom 的 zookeeper 依赖声明上追加 logback 排除项,让所有模块统一
不再传递引入 logback,保持项目日志框架为 log4j2-slf4j-impl。

本地验证:
- linkis-bml-server: 99 tests pass
- linkis-jobhistory: all tests pass
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