AlexStocks commented on code in PR #3244:
URL: https://github.com/apache/dubbo-go/pull/3244#discussion_r2935064047
##########
Makefile:
##########
@@ -37,6 +37,7 @@ help:
# Run unit tests
test: clean
+ go env -w GOTOOLCHAIN=go1.25.0+auto
Review Comment:
确认修复正确。改用环境变量方式不会持久化,每次只影响当前 `go test` 进程。
##########
global/config_test.go:
##########
@@ -710,9 +710,10 @@ func TestRegistryConfigClone(t *testing.T) {
assert.Equal(t, reg.UseAsMetaReport, cloned.UseAsMetaReport)
assert.Equal(t, reg.UseAsConfigCenter, cloned.UseAsConfigCenter)
assert.NotSame(t, reg, cloned)
- assert.NotSame(t, reg.Params, cloned.Params)
assert.Equal(t, "value1", cloned.Params["key1"])
assert.Equal(t, "value2", cloned.Params["key2"])
+ cloned.Params["key1"] = "changed"
Review Comment:
了解,新版 testify 的 `NotSame` 对 map/slice 类型的行为确实变了(不再比较底层指针,而是用 `!=` 比较,map 和
slice 不支持 `!=`)。用 clone-then-modify 验证深拷贝正确性是合理的替代方案。
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]