mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
block until rpc connection is ready
This commit is contained in:
parent
ed79ba6cba
commit
1179ecef27
@ -116,7 +116,7 @@ func TestCommanderRemoveHandler(t *testing.T) {
|
||||
assert(conn.Close(), IsNil)
|
||||
}
|
||||
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure())
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
|
||||
assert(err, IsNil)
|
||||
|
||||
hsClient := command.NewHandlerServiceClient(cmdConn)
|
||||
@ -296,7 +296,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
|
||||
assert(conn.Close(), IsNil)
|
||||
}
|
||||
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure())
|
||||
cmdConn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", cmdPort), grpc.WithInsecure(), grpc.WithBlock())
|
||||
assert(err, IsNil)
|
||||
|
||||
hsClient := command.NewHandlerServiceClient(cmdConn)
|
||||
|
Loading…
Reference in New Issue
Block a user