Skip to content
Snippets Groups Projects
Commit 94418d49 authored by Antoine Pietri's avatar Antoine Pietri
Browse files

GRPC: use port 50091 by default

parent 441aacc6
No related branches found
No related tags found
No related merge requests found
......@@ -316,11 +316,11 @@ class CountVisitNodesView(CountView):
pass
def make_app(config=None, rpc_url=None, **kwargs):
def make_app(config=None, rpc_url=None, spawn_rpc_port=50091, **kwargs):
app = GraphServerApp(**kwargs)
if rpc_url is None:
app["local_server"], port = spawn_java_rpc_server(config)
app["local_server"], port = spawn_java_rpc_server(config, port=spawn_rpc_port)
rpc_url = f"localhost:{port}"
app.add_routes(
......
......@@ -29,7 +29,7 @@ class GraphServerProcess(multiprocessing.Process):
try:
config = {"graph": {"path": TEST_GRAPH_PATH}}
with loop_context() as loop:
app = make_app(config=config, debug=True)
app = make_app(config=config, debug=True, spawn_rpc_port=None)
client = TestClient(TestServer(app), loop=loop)
loop.run_until_complete(client.start_server())
url = client.make_url("/graph/")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment