Skip to content

Commit d586bd9

Browse files
authored
chore: add timeout to run nox session (#14873)
This PR adds a timeout to run nox sessions to avoid getting the generation stuck.
1 parent 5797f43 commit d586bd9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.generator/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -929,7 +929,7 @@ def _run_individual_session(nox_session: str, library_id: str, repo: str):
929929
"-f",
930930
f"{repo}/packages/{library_id}/noxfile.py",
931931
]
932-
result = subprocess.run(command, text=True, check=True)
932+
result = subprocess.run(command, text=True, check=True, timeout=600)
933933
logger.info(result)
934934

935935

.generator/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -730,7 +730,7 @@ def test_run_individual_session_success(mocker, caplog):
730730
"-f",
731731
f"{REPO_DIR}/packages/{test_library_id}/noxfile.py",
732732
]
733-
mock_subprocess_run.assert_called_once_with(expected_command, text=True, check=True)
733+
mock_subprocess_run.assert_called_once_with(expected_command, text=True, check=True, timeout=600)
734734

735735

736736
def test_run_individual_session_failure(mocker):

0 commit comments

Comments
 (0)