mirror of
https://github.com/hanzoai/datastore.git
synced 2026-09-26 13:55:07 +00:00
The `execute_query` method in the Python test helper uses `epoll` to read from both stdout and stderr of the keeper-client process. When a command fails, the keeper-client writes the error to stderr and then the separator to stdout. However, when both events arrive simultaneously in `epoll.poll()`, the loop could process stdout first, find the separator, and return successfully without ever reading the pending stderr error data - causing the exception to be silently swallowed. Fix both sides: - C++ (`KeeperClient.cpp`): flush stderr before writing the stdout separator, ensuring error data is in the pipe buffer first. - Python (`keeper_utils.py`): process stderr events before stdout events in the poll loop, so errors are always collected before checking the separator. Also fix test cleanup: add `try/finally` with `drop_node_if_exists` to `test_rm_with_version` and `test_rm_without_version`, and give `test_rm_without_version` its own unique node path instead of reusing `/test_rm_with_version_node`. https://s3.amazonaws.com/clickhouse-test-reports/json.html?PR=97554&sha=3f86a6142c6920239c1b3adedfe82ccb5fcd6515&name_0=PR&name_1=Integration%20tests%20%28amd_binary%2C%204%2F5%29 Co-Authored-By: Claude Opus 4.6 <[email protected]>