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
Esempio 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
 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
Esempio 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