dubbo-go icon indicating copy to clipboard operation
dubbo-go copied to clipboard

ut failure of TestUnavailableIfHostInvalid

Open AlexStocks opened this issue 8 months ago • 1 comments

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

AlexStocks avatar Apr 26 '25 09:04 AlexStocks

I will be responsible for the subsequent work.

marsevilspirit avatar Apr 26 '25 10:04 marsevilspirit