Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions test/integ/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,8 +591,14 @@ def test_take_ownership_via_pid(tor_cmd):
start_time = time.time()

while time.time() - start_time < 30:
if tor_process.poll() == 0:
return # tor exited
if tor_process.poll() != None:
exitcode = tor_process.returncode
if exitcode < 0:
raise AssertionError("Tor exited with signal %d"%-exitcode)
elif exitcode > 0:
raise AssertionError("Tor exited with exit code %d"%exitcode)
else:
return # tor exited without error.

time.sleep(0.01)

Expand Down Expand Up @@ -632,8 +638,14 @@ def test_take_ownership_via_controller(tor_cmd):
start_time = time.time()

while time.time() - start_time < 20:
if tor_process.poll() == 0:
return # tor exited
if tor_process.poll() != None:
exitcode = tor_process.returncode
if exitcode < 0:
raise AssertionError("Tor exited with signal %d"%-exitcode)
elif exitcode > 0:
raise AssertionError("Tor exited with exit code %d"%exitcode)
else:
return # tor exited without error.

time.sleep(0.01)

Expand Down