diff --git a/.github/mcp/mcp_pytest.py b/.github/mcp/mcp_pytest.py index 1dd5645bca..764bf5fa3b 100644 --- a/.github/mcp/mcp_pytest.py +++ b/.github/mcp/mcp_pytest.py @@ -7,7 +7,7 @@ import time from mcli.sdk import (RunConfig, RunStatus, create_run, follow_run_logs, - stop_run, wait_for_run_status) + wait_for_run_status) if __name__ == '__main__': @@ -109,6 +109,7 @@ image=args.image, integrations=[git_integration], command=command, + scheduling={'max_duration_seconds:': args.timeout}, ) # Create run @@ -123,14 +124,6 @@ # Print logs for line in follow_run_logs(run): print(line, end='') - # Check if args.timeout seconds have elapsed - if time.time() - start_time > args.timeout: - print( - f'[GHA] Run timed out and did not complete in {args.timeout/60} minutes.' - ) - run = stop_run(run) - print('[GHA] Run stopped.') - break print('[GHA] Run completed. Waiting for run to finish...') run = wait_for_run_status(run, status='completed')