diff --git a/framework/runner/scripts/test_executor.py b/framework/runner/scripts/test_executor.py index 5501a995..89d0bfb3 100644 --- a/framework/runner/scripts/test_executor.py +++ b/framework/runner/scripts/test_executor.py @@ -1,3 +1,6 @@ +import os +import threading +import time from optparse import OptionParser from typing import Optional @@ -117,6 +120,15 @@ def main(): log_summary(test_executor_summary) + # Force exit after 10 seconds if process doesn't terminate naturally + def force_exit_timer(): + time.sleep(10) + get_logger().log_warning("Process did not exit naturally, forcing exit...") + os._exit(0) + + timer_thread = threading.Thread(target=force_exit_timer, daemon=True) + timer_thread.start() + return 0