Taragolis commented on code in PR #28378:
URL: https://github.com/apache/airflow/pull/28378#discussion_r1049667124
##########
tests/utils/test_process_utils.py:
##########
@@ -202,15 +202,16 @@ def test_should_restore_state_when_exception(self):
assert "TEST_NOT_EXISTS" not in os.environ
-class TestCheckIfPidfileProcessIsRunning(unittest.TestCase):
+class TestCheckIfPidfileProcessIsRunning:
def test_ok_if_no_file(self):
check_if_pidfile_process_is_running("some/pid/file",
process_name="test")
def test_remove_if_no_process(self):
# Assert file is deleted
with pytest.raises(FileNotFoundError):
with NamedTemporaryFile("+w") as f:
- f.write("19191919191919191991")
+ # limit pid as max of int32, otherwise this test could fail on
some platform
+ f.write(f"{2**31 - 1}")
Review Comment:
Small fix for success execute test in macOS ARM, no idea about behaviour in
Intel based mac
```console
self = <psutil._psosx.Process object at 0x105e7cd40>
@wrap_exceptions
@memoize_when_activated
def _get_kinfo_proc(self):
# Note: should work with all PIDs without permission issues.
> ret = cext.proc_kinfo_oneshot(self.pid)
E OverflowError: Python int too large to convert to C long
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]