func getClients(t *testing.T, serverCh *tchannel.Channel) (gen.TChanSimpleService, gen.TChanSecondService) { serverInfo := serverCh.PeerInfo() ch := testutils.NewClient(t, nil) ch.Peers().Add(serverInfo.HostPort) client := NewClient(ch, serverInfo.ServiceName, nil) simpleClient := gen.NewTChanSimpleServiceClient(client) secondClient := gen.NewTChanSecondServiceClient(client) return simpleClient, secondClient }
func getClients(serverCh *tchannel.Channel) (gen.TChanSimpleService, gen.TChanSecondService, error) { serverInfo := serverCh.PeerInfo() ch, err := testutils.NewClientChannel(nil) if err != nil { return nil, nil, err } ch.Peers().Add(serverInfo.HostPort) client := NewClient(ch, serverInfo.ServiceName, nil) simpleClient := gen.NewTChanSimpleServiceClient(client) secondClient := gen.NewTChanSecondServiceClient(client) return simpleClient, secondClient, nil }