func TestInitClient2(t *testing.T) { socket := thrift.NewTSocketFromAddrTimeout(addr, TIMEOUT) transport := thrift.NewTFramedTransport(socket) var protocol thrift.TProtocol = thrift.NewTBinaryProtocolTransport(transport) protocol = thrift.NewTMultiplexedProtocol(protocol, "SecondService") secondClient = MuliplexedProtocolTest.NewSecondClientProtocol(transport, protocol, protocol) err := transport.Open() if err != nil { t.Fatal("Unable to open client socket", err) } }
//create client without service prefix func createLegacyClient(t *testing.T) *MuliplexedProtocolTest.SecondClient { socket := thrift.NewTSocketFromAddrTimeout(addr, TIMEOUT) transport := thrift.NewTFramedTransport(socket) var protocol thrift.TProtocol = thrift.NewTBinaryProtocolTransport(transport) legacyClient := MuliplexedProtocolTest.NewSecondClientProtocol(transport, protocol, protocol) err := transport.Open() if err != nil { t.Fatal("Unable to open client socket", err) } return legacyClient }