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.
问题
channel test 存在很多假阴性问题,即实际上测试失败了,但是页面显示成功。
原因
controller/channel-test.go
这个文件里,是在 defer 中通过判定 err 是否为空来判断是否失败的,但是代码中很多失败条件下的 err 实际上被覆盖了,导致 defer 中的 err 始终为空,从而导致假阴性。修复
不要使用
err :=
来避免覆盖 err。其他修复:test prompt
原来的这个 prompt 会被 azure 的默认 content filter 拦截,所以换了一个。
自测