Yicong-Huang opened a new pull request, #4704: URL: https://github.com/apache/texera/pull/4704
### What changes were proposed in this PR? Adds pytest coverage for `amber/src/main/python/core/runnables/heartbeat.py`. `stop()` is intentionally not exercised — it sends `SIGTERM` to the test runner — and `run()` is only verified on the early-exit branch (a pre-set stop event). ### Any related issues, documentation, discussions? Closes #4703. Potential bug noted while reading the module (not pinned by these tests): `_check_heartbeat`'s try/except wraps both the `create_connection` and the subsequent `temp_socket.close()`. If `close()` raises after a successful connect, the method logs "Server is down" and returns `False` even though the JVM is reachable. The double-check in `run()` masks transient occurrences but it is still misleading. Worth deciding whether to narrow the try/except to the connect call only. ### How was this PR tested? ``` cd amber/src/main/python ruff check core/runnables/test_heartbeat.py ruff format --check core/runnables/test_heartbeat.py python -m pytest core/runnables/test_heartbeat.py ``` ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (claude-opus-4-7) -- 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]
