block until rpc connection is ready

pull/946/head
Darien Raymond 2018-03-08 23:40:02 +01:00
parent ed79ba6cba
commit 1179ecef27
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169
1 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ func TestCommanderRemoveHandler(t *testing.T) {
assert(conn.Close(), IsNil) 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) assert(err, IsNil)
hsClient := command.NewHandlerServiceClient(cmdConn) hsClient := command.NewHandlerServiceClient(cmdConn)
@ -296,7 +296,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
assert(conn.Close(), IsNil) 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) assert(err, IsNil)
hsClient := command.NewHandlerServiceClient(cmdConn) hsClient := command.NewHandlerServiceClient(cmdConn)