Skip to content

Confusing for NewClient in 1.63 #7093

Closed
@SamYuan1990

Description

@SamYuan1990

Please see the FAQ in our main README.md before submitting your issue.

NewClient

// The DialOptions returned by WithBlock, WithTimeout, and

but

func WithTimeout(d time.Duration) DialOption {

// WithTimeout returns a DialOption that configures a timeout for dialing a
// ClientConn initially. This is valid if and only if WithBlock() is present.
//
// Deprecated: use DialContext instead of Dial and context.WithTimeout
// instead.  Will be supported throughout 1.x.

hence, which means in 1.63 we Deprecated timeout support?

as I found this issue by lint Hyperledger-TWGC/tape#384

if I change to the NewClient following unit test case

func (s) TestWithTimeout(t *testing.T) {
I will use another Deprecated function as WithTimeout?

Any suggestion?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions