Skip to content

Commit

Permalink
Fix non terminating timeouts (#421)
Browse files Browse the repository at this point in the history
Co-authored-by: Valentin Seitz <valentin.seitz@tum.de>
  • Loading branch information
valentin-seitz and Valentin Seitz authored Dec 12, 2023
1 parent 1011c9d commit 8d6c2ee
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tools/tests/systemtests/Systemtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,12 @@ def _run_field_compare(self):
stdout, stderr = process.communicate(timeout=GLOBAL_TIMEOUT)
except KeyboardInterrupt as k:
process.kill()
# process.send_signal(9)
raise KeyboardInterrupt from k
except Exception as e:
logging.critical(
f"Systemtest {self} had serious issues executin the docker compose command about to kill the docker compose command. Please check the logs! {e}")
f"Systemtest {self} had serious issues executing the docker compose command about to kill the docker compose command. Please check the logs! {e}")
process.kill()
stdout, stderr = process.communicate()
process.communicate(timeout=10)
stdout_data.extend(stdout.decode().splitlines())
stderr_data.extend(stderr.decode().splitlines())
process.poll()
Expand Down Expand Up @@ -397,16 +396,16 @@ def _build_docker(self):
cwd=self.system_test_dir)

try:
stdout, stderr = process.communicate()
stdout, stderr = process.communicate(timeout=GLOBAL_TIMEOUT)
except KeyboardInterrupt as k:
process.kill()
# process.send_signal(9)
raise KeyboardInterrupt from k
except Exception as e:
logging.critical(
f"systemtest {self} had serious issues building the docker images via the `docker compose build` command. About to kill the docker compose command. Please check the logs! {e}")
process.communicate(timeout=10)
process.kill()
stdout, stderr = process.communicate()

stdout_data.extend(stdout.decode().splitlines())
stderr_data.extend(stderr.decode().splitlines())
Expand Down Expand Up @@ -448,9 +447,10 @@ def _run_tutorial(self):
raise KeyboardInterrupt from k
except Exception as e:
logging.critical(
f"Systemtest {self} had serious issues executin the docker compose command about to kill the docker compose command. Please check the logs! {e}")
f"Systemtest {self} had serious issues executing the docker compose command about to kill the docker compose command. Please check the logs! {e}")
process.kill()
stdout, stderr = process.communicate(timeout=10)
process.kill()
stdout, stderr = process.communicate()

stdout_data.extend(stdout.decode().splitlines())
stderr_data.extend(stderr.decode().splitlines())
Expand Down

0 comments on commit 8d6c2ee

Please sign in to comment.