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 = multiplexedprotocoltest.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) *multiplexedprotocoltest.SecondClient { socket := thrift.NewTSocketFromAddrTimeout(addr, TIMEOUT) transport := thrift.NewTFramedTransport(socket) var protocol thrift.TProtocol = thrift.NewTBinaryProtocolTransport(transport) legacyClient := multiplexedprotocoltest.NewSecondClientProtocol(transport, protocol, protocol) err := transport.Open() if err != nil { t.Fatal("Unable to open client socket", err) } return legacyClient }