Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
refactor(proto): request_id is now an integer
Browse files Browse the repository at this point in the history
  • Loading branch information
hanhxiao committed Aug 23, 2019
1 parent 11abb2e commit 3d63fac
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion gnes/client/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def __init__(self, args):
all_bytes = [b'a' * args.request_length] * args.num_requests

with grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', args.max_message_size * 1024 * 1024),
('grpc.max_receive_message_length', args.max_message_size * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down
2 changes: 1 addition & 1 deletion gnes/client/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(self, args):
raise AttributeError('--txt_file, --image_zip_file, --video_zip_file one must be given')

with grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', args.max_message_size * 1024 * 1024),
('grpc.max_receive_message_length', args.max_message_size * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_dummy_transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_pymode(self):
with ServiceManager(EncoderService, e_args), \
ServiceManager(PreprocessorService, p_args), \
ServiceManager(FrontendService, args), \
grpc.insecure_channel('%s:%s' % (args.grpc_host, args.grpc_port),
grpc.insecure_channel('%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', 70 * 1024 * 1024),
('grpc.max_receive_message_length', 70 * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_service_mgr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def _test_grpc_multiple_router(self, backend='thread', num_parallel=5):
])

with ServiceManager(RouterService, p_args), FrontendService(args), grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', 70 * 1024 * 1024),
('grpc.max_receive_message_length', 70 * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand All @@ -68,7 +68,7 @@ def _test_grpc_multiple_pub(self, backend='thread', num_parallel=5):
])

with ServiceManager(RouterService, p_args), FrontendService(args), grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', 70 * 1024 * 1024),
('grpc.max_receive_message_length', 70 * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down
4 changes: 2 additions & 2 deletions tests/test_stream_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_grpc_frontend(self):
])

with RouterService(p_args), FrontendService(args), grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', 70 * 1024 * 1024),
('grpc.max_receive_message_length', 70 * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down Expand Up @@ -106,7 +106,7 @@ def test_async_block(self):
])

with FrontendService(args), Router1(p1_args), Router2(p2_args), grpc.insecure_channel(
'%s:%s' % (args.grpc_host, args.grpc_port),
'%s:%d' % (args.grpc_host, args.grpc_port),
options=[('grpc.max_send_message_length', 70 * 1024 * 1024),
('grpc.max_receive_message_length', 70 * 1024 * 1024)]) as channel:
stub = gnes_pb2_grpc.GnesRPCStub(channel)
Expand Down

0 comments on commit 3d63fac

Please sign in to comment.