Skip to content

Commit

Permalink
Added shutdown detection (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
fzovpec authored Apr 17, 2024
1 parent 95e396a commit a97ff81
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chat_client_check/check.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@ def execute_and_collect_output(cmd):

def execute_and_detach(cmd):
child = pexpect.spawn(cmd, encoding='utf-8')
try:
child.expect(pexpect.EOF, timeout=0.5)
raise TestException(f'The command \'{cmd}\' has terminated unexpectedly')
except:
pass
return child

def start_script():
Expand Down

0 comments on commit a97ff81

Please sign in to comment.