apache / apache/servicecomb-java-chassis
TestRestClientInvocation的单元测试无法有效验证功能
Open
- Dominant language
- Java
- Stars
- 1.9k
- Forks
- 814
- Avg merge
- 8d 23h
- Merged PRs (30d)
- 1
Description
问题出在 `TestRestClientInvocation` 的 `testSetCseContext_enable_unicode` 方法和 `testSetCseContext_disable_unicode` 方法中, 两个方法都是开头对`invocation.getContext()`进行mock, 结尾又调用`invocation.getContext()`获取结果进行校验, 获取的结果就是mock返回, 所以达不到测试的预期效果. 1.3.x 和 2.8.x 分支均有此问题, 建议优化一下UT代码.
https://github.com/apache/servicecomb-java-chassis/blob/21d4b4863b71332f151eb63020f4e9ac51583002/transports/transport-rest/transport-rest-client/src/test/java/org/apache/servicecomb/transport/rest/client/http/TestRestClientInvocation.java#L282-L346
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.