Exemplo n.º 1
0
 def test_call():
     ee = QueueEventEngine()
     client = EventRPCClient(ee, 'test')
     server = EventRPCServer(ee, 'test')
     server.register("server_print_hello", server_print_hello)
     ee.start()
     client.call("server_print_hello", { 'msg': 'parral_client'}, client_print_hello)
     return ee
Exemplo n.º 2
0
 def test_call():
     ee = QueueEventEngine()
     client = EventRPCClient(ee, 'test')
     server = EventRPCServer(ee, 'test')
     server.register("server_print_hello", server_print_hello)
     ee.start()
     client.call("server_print_hello", {'msg': 'parral_client'},
                 client_print_hello)
     return ee
Exemplo n.º 3
0
 def test_sync_call(timeout):
     ee = QueueEventEngine()
     client = EventRPCClient(ee, 'test')
     server = EventRPCServer(ee, 'test')
     server.register("server_print_hello", server_print_hello)
     ee.start()
     print client.sync_call("server_print_hello", { 'msg': 'sync_client'}, timeout), "**" 
     ee.stop()
     return
Exemplo n.º 4
0
 def test_sync_call(timeout):
     ee = QueueEventEngine()
     client = EventRPCClient(ee, 'test')
     server = EventRPCServer(ee, 'test')
     server.register("server_print_hello", server_print_hello)
     ee.start()
     print client.sync_call("server_print_hello", {'msg': 'sync_client'},
                            timeout), "**"
     ee.stop()
     return