Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #660 +/- ##
============================================
+ Coverage 19.79% 19.85% +0.05%
- Complexity 946 950 +4
============================================
Files 375 375
Lines 15598 15607 +9
Branches 1998 2001 +3
============================================
+ Hits 3088 3099 +11
Misses 12125 12125
+ Partials 385 383 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| // 跳过第一个为空的str | ||
| TrieNode<String> node = root; | ||
| // 一些场景下(例如dubbo的接口名是com.tencent.polaris.serviceName),apiPath 不以"/"开头和分割,则直接构造node | ||
| if (apiPaths.length == 1) { |
There was a problem hiding this comment.
如果path是/,那么apiPaths是什么样的?
There was a problem hiding this comment.
apiPaths.length为0,仅返回根节点
There was a problem hiding this comment.
这里会有个情况是,/path会和path生成同样的树结构。
| // 跳过第一个为空的str | ||
| TrieNode<String> node = root; | ||
| // 一些场景下(例如dubbo的接口名是com.tencent.polaris.serviceName),apiPath 不以"/"开头和分割,则直接构造node | ||
| if (apiPaths.length == 1) { |
701ea8c to
d628c92
Compare
Code Review严重 Bug1. if (apiPathInfo.contains("#")) {
node = node.getOrCreateSubNode(apiPathInfo); // 错误,应该是 getSubNode查找操作不应创建节点。 2. // build 中
if (path.contains("#")) {
node = node.getOrCreateSubNode(path); // 用 path(已去除 -METHOD 后缀)
// check 中
if (apiPathInfo.contains("#")) {
node = node.getOrCreateSubNode(apiPathInfo); // 用原始字符串当 gRPC 路径含有 设计问题3. gRPC 路径仍然走 HTTP method 解析流程 gRPC 路径不含 代码质量4. Checkstyle 格式问题(CI 会报错) if(apiPathInfo.contains("#")){ // if 后缺空格,{ 前缺空格5. 多余的连续空行 删除 测试遗漏6. 缺少在空 Trie / 不含该路径的 Trie 中查找 gRPC 路径的测试 所有测试中 root 都是基于对应路径 build 出来的。因为 bug #1( 7. 缺少混合 Trie 的测试 没有"同一个 Trie 同时包含 HTTP 路径和 gRPC 路径"的场景测试。 总结
|
No description provided.