|
|
@ -96,20 +96,21 @@ func TestDepositServer_Deposit(t *testing.T) {
|
|
|
|
return invoker(ctx, method, req, reply, cc, opts...)
|
|
|
|
return invoker(ctx, method, req, reply, cc, opts...)
|
|
|
|
}),
|
|
|
|
}),
|
|
|
|
)
|
|
|
|
)
|
|
|
|
retryClient := MustNewClient(
|
|
|
|
// TODO: enable it in v1.2.4
|
|
|
|
RpcClientConf{
|
|
|
|
// retryClient := MustNewClient(
|
|
|
|
Endpoints: []string{"foo"},
|
|
|
|
// RpcClientConf{
|
|
|
|
App: "foo",
|
|
|
|
// Endpoints: []string{"foo"},
|
|
|
|
Token: "bar",
|
|
|
|
// App: "foo",
|
|
|
|
Timeout: 1000,
|
|
|
|
// Token: "bar",
|
|
|
|
Retry: true,
|
|
|
|
// Timeout: 1000,
|
|
|
|
},
|
|
|
|
// Retry: true,
|
|
|
|
WithDialOption(grpc.WithContextDialer(dialer())),
|
|
|
|
// },
|
|
|
|
WithUnaryClientInterceptor(func(ctx context.Context, method string, req, reply interface{},
|
|
|
|
// WithDialOption(grpc.WithContextDialer(dialer())),
|
|
|
|
cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
|
|
|
// WithUnaryClientInterceptor(func(ctx context.Context, method string, req, reply interface{},
|
|
|
|
return invoker(ctx, method, req, reply, cc, opts...)
|
|
|
|
// cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption) error {
|
|
|
|
}),
|
|
|
|
// return invoker(ctx, method, req, reply, cc, opts...)
|
|
|
|
)
|
|
|
|
// }),
|
|
|
|
|
|
|
|
// )
|
|
|
|
tarConfClient := MustNewClient(
|
|
|
|
tarConfClient := MustNewClient(
|
|
|
|
RpcClientConf{
|
|
|
|
RpcClientConf{
|
|
|
|
Target: "foo",
|
|
|
|
Target: "foo",
|
|
|
@ -134,7 +135,8 @@ func TestDepositServer_Deposit(t *testing.T) {
|
|
|
|
clients := []Client{
|
|
|
|
clients := []Client{
|
|
|
|
directClient,
|
|
|
|
directClient,
|
|
|
|
nonBlockClient,
|
|
|
|
nonBlockClient,
|
|
|
|
retryClient,
|
|
|
|
// TODO: enable it in v1.2.4
|
|
|
|
|
|
|
|
// retryClient,
|
|
|
|
tarConfClient,
|
|
|
|
tarConfClient,
|
|
|
|
targetClient,
|
|
|
|
targetClient,
|
|
|
|
}
|
|
|
|
}
|
|
|
|