dubbo-go
dubbo-go copied to clipboard
ut failure of TestUnavailableIfHostInvalid
func TestUnavailableIfHostInvalid(t *testing.T) {
t.Parallel()
client := pingv1connect.NewPingServiceClient(
http.DefaultClient,
"https://api.invalid/",
)
err := client.Ping(
context.Background(),
triple.NewRequest(&pingv1.PingRequest{}),
triple.NewResponse(&pingv1.PingResponse{}),
)
assert.NotNil(t, err)
assert.Equal(t, triple.CodeOf(err), triple.CodeUnavailable)
}
打开本地翻墙代理的情况下, unit test 报错:
--- FAIL: TestUnavailableIfHostInvalid (0.24s)
triple_ext_test.go:803:
assertion: assert.Equal
got: internal
want: unavailable
本地代理配置: export https_proxy=http://127.0.0.1:7890 export http_proxy=http://127.0.0.1:7890 export all_proxy=socks5://127.0.0.1:7890
I will be responsible for the subsequent work.