You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "AlexStocks (via GitHub)" <gi...@apache.org> on 2025/05/01 02:49:38 UTC

Re: [PR] feat: Support dynamic update of routing configuration [dubbo-go-pixiu]

AlexStocks commented on code in PR #658:
URL: https://github.com/apache/dubbo-go-pixiu/pull/658#discussion_r2069788542


##########
pkg/common/router/trie/trie_test.go:
##########
@@ -206,3 +206,35 @@ func TestTrie_ParamMatch(t *testing.T) {
 	assert.Equal(t, "", node.GetBizInfo())
 	assert.True(t, ret)
 }
+
+func TestTrieSoftDelete(t *testing.T) {
+	trie := NewTrie()
+
+	ret, _ := trie.Put("/a/b/c", "route1")
+	assert.True(t, ret)
+
+	ret, _ = trie.Put("/a/b/c/d", "route2")
+	assert.True(t, ret)
+
+	ret, _ = trie.Put("/a/b/e", "route3")
+	assert.True(t, ret)
+
+	node, _, ok := trie.Match("/a/b/c")

Review Comment:
   能否加一个测试case:
   '/a/b/c/' 看下这个测试 case sh否能匹配到 ‘route1’



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org