server: tests: reducing sleep time during scenario
This commit is contained in:
parent
bedf37c9d1
commit
530d3ae4c4
1 changed files with 3 additions and 3 deletions
|
@ -19,15 +19,15 @@ def after_scenario(context, scenario):
|
|||
print(f"stopping server pid={context.server_process.pid} ...")
|
||||
context.server_process.kill()
|
||||
# Wait few for socket to free up
|
||||
time.sleep(0.1)
|
||||
time.sleep(0.05)
|
||||
|
||||
attempts = 0
|
||||
while is_server_listening(context.server_fqdn, context.server_port):
|
||||
print(f"stopping server pid={context.server_process.pid} ...")
|
||||
os.kill(context.server_process.pid, SIGKILL)
|
||||
time.sleep(0.5)
|
||||
time.sleep(0.1)
|
||||
attempts += 1
|
||||
if attempts > 1:
|
||||
if attempts > 5:
|
||||
print(f"Server dandling exits, killing all {context.server_path} ...")
|
||||
process = subprocess.run(['killall', '-9', context.server_path],
|
||||
stderr=subprocess.PIPE,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue