kube-tarian / git-bridge

Expected 2 blank lines FLK-E302
Style
Minor
2 years ago2 years old
121    print(client.call("TestRpcInt.Echo123", ["A1", "B2", "C3"]))
122    print(client.call("TestRpcInt.EchoStruct", {"A" :"Aa", "B":"Bb", "C":"Cc"}))
123
124def doMain(args):125    if len(args) == 2 and args[0] == "testdata":
126        build_test_data(args[1])
127    elif len(args) == 3 and args[0] == "rpc-server":
114#         print("\t>>>> Port is not open")
115#     sock.close()
116    
117def doRpcClientToGoSvc(port):118    # doCheckSocket(port)
119    address = msgpackrpc.Address(mylocaladdr, port)
120    client = msgpackrpc.Client(address, unpack_encoding='utf-8')
 98        t.start()
 99    server.start()
100
101def doRpcClientToPythonSvc(port):102    address = msgpackrpc.Address(mylocaladdr, port)
103    client = msgpackrpc.Client(address, unpack_encoding='utf-8')
104    print(client.call("Echo123", "A1", "B2", "C3"))
 80        with open(os.path.join(destdir, str(i) + '.cbor.golden'), 'wb') as f:
 81            f.write(serialized)
 82
 83def doRpcServer(port, stopTimeSec): 84    class EchoHandler(object):
 85        def Echo123(self, msg1, msg2, msg3):
 86            return ("1:%s 2:%s 3:%s" % (msg1.decode("utf-8"), msg2.decode("utf-8"), msg3.decode("utf-8")))
 69    l.extend(l1)
 70    return l
 71
 72def build_test_data(destdir): 73    l = get_test_data_list()
 74    for i in range(len(l)):
 75        # packer = msgpack.Packer()