Commit 0f9aefb3 authored by eckhart's avatar eckhart

test/test_server.py: uses different port number on each run to prevent...

test/test_server.py: uses different port number on each run to prevent interferences if several instances of test_server.py are run in parallel (e.g. when testing concurrently on several processor cores with different python version)
parent f2ffe00d
......@@ -48,4 +48,5 @@ OLDSTUFF
*.c
*.pyd
docs/*
**/node_modules
\ No newline at end of file
**/node_modules
*.py.cfg
127.0.0.1 8888
\ No newline at end of file
......@@ -43,7 +43,9 @@ sys.path.append(os.path.abspath(os.path.join(scriptpath, '..')))
from DHParser.server import Server, spawn_server, stop_server, asyncio_run, asyncio_connect, \
has_server_stopped, gen_lsp_table, STOP_SERVER_REQUEST, IDENTIFY_REQUEST, SERVER_OFFLINE
TEST_PORT = 8889
TEST_PORT = 8000 + os.getpid() % 1000
# adding pid % 100 hopefully prevents interference, if `test_server.py` is run in
# parallel with several different python versions, as done by `run.py`
def compiler_dummy(src: str, log_dir: str='') -> str:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment