def _call(name):
     content = client.invoke_sync(
         self.interface,
         "hello",
         SampleServicePbRequest(name=str(name)).SerializeToString(),
         timeout_ms=5000,
         spanctx=SpanContext())
     result = SampleServicePbResult()
     result.ParseFromString(content)
     print(result.result == str(name))
     _result.append(result.result == str(name))
def run_client(text):
    print("client start", text)
    spanctx = SpanContext()

    client = Client("test_app")
    client.subscribe(interface)

    content = client.invoke_sync(interface, "hello",
                                 SampleServicePbRequest(name=text).SerializeToString(),
                                 timeout_ms=5000, spanctx=spanctx)
    print("client", content)
    result = SampleServicePbResult()
    result.ParseFromString(content)

    print("client", result)
 def _cb(content, expect):
     result = SampleServicePbResult()
     result.ParseFromString(content)
     print(expect == result.result)
     _result.append(expect == result.result)