Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: channel test false negative #2065

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Laisky
Copy link
Contributor

@Laisky Laisky commented Feb 8, 2025

问题

channel test 存在很多假阴性问题,即实际上测试失败了,但是页面显示成功。

原因

controller/channel-test.go 这个文件里,是在 defer 中通过判定 err 是否为空来判断是否失败的,但是代码中很多失败条件下的 err 实际上被覆盖了,导致 defer 中的 err 始终为空,从而导致假阴性。

修复

不要使用 err := 来避免覆盖 err。

其他修复:test prompt

原来的这个 prompt 会被 azure 的默认 content filter 拦截,所以换了一个。

自测

CleanShot 2025-02-08 at 15 16 29@2x

@Laisky Laisky changed the title fix: channel test 假阴性问题 fix: channel test false negative Feb 8, 2025
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