Skip to content

Commit

Permalink
Remove port arg from __init__ in TestServerProcess
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
  • Loading branch information
MVrachev committed Oct 14, 2020
1 parent 3cce0dd commit 392d4cd
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,6 @@ class TestServerProcess():
Path to the server to run in the subprocess.
Default is "simpler_server.py".
port:
The port used to access the server. If none is provided,
then one will be generated.
Default is None.
timeout:
Time in seconds in which the server should start or otherwise
TimeoutError error will be raised.
Expand All @@ -141,17 +136,16 @@ class TestServerProcess():
"""


def __init__(self, log, server='simple_server.py',
port=None, timeout=10, popen_cwd=".",
extra_cmd_args=[]):
def __init__(self, log, server='simple_server.py', timeout=10,
popen_cwd=".", extra_cmd_args=[]):

# Create temporary log file used for logging stdout and stderr
# of the subprocess. In the mode "r+"" stands for reading and writing
# and "t" stands for text mode.
self.__temp_log_file = tempfile.TemporaryFile(mode='r+t')

self.server = server
self.port = port or random.randint(30000, 45000)
self.port = random.randint(30000, 45000)
self.__logger = log

started = False
Expand Down

0 comments on commit 392d4cd

Please sign in to comment.