This is an automated email from the ASF dual-hosted git repository. djwang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/cloudberry.git
commit 8d8a3f9684d194fc841c2b4e44550331da0a8266 Author: Dianjin Wang <[email protected]> AuthorDate: Tue Jan 20 14:12:32 2026 +0800 Fix: make motion_socket test Python 3.6 compatible The `capture_output` argument for `subprocess.run` is not available in Python 3.6, which is the default on Rocky Linux 8. This commit replaces it with `stdout=subprocess.PIPE` and `stderr= subprocess.PIPE` to ensure backward compatibility. This enables `ic-good-opt-*` tests to pass on Rocky 8 environments. See: https://github.com/apache/cloudberry/issues/1538 --- src/test/regress/expected/motion_socket.out | 2 +- src/test/regress/sql/motion_socket.sql | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/regress/expected/motion_socket.out b/src/test/regress/expected/motion_socket.out index 62a70660f59..baca679ecf3 100644 --- a/src/test/regress/expected/motion_socket.out +++ b/src/test/regress/expected/motion_socket.out @@ -48,7 +48,7 @@ for pid in pids_to_check: # We check count of those connections which have not been established. # Use the regex for example: "TCP <ip>:\d+ .*" (without '->') lsof_ret = subprocess.run(["lsof", "-i", "-nP", "-a", "-p", str(pid)], - capture_output=True, check=True).stdout + stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True).stdout plpy.info( f'Checking postgres backend {pid}, ' \ f'lsof output:\n{os.linesep.join(map(str, lsof_ret.splitlines()))}') diff --git a/src/test/regress/sql/motion_socket.sql b/src/test/regress/sql/motion_socket.sql index 6d1a08973e0..be5cd21b1cd 100644 --- a/src/test/regress/sql/motion_socket.sql +++ b/src/test/regress/sql/motion_socket.sql @@ -50,7 +50,7 @@ for pid in pids_to_check: # We check count of those connections which have not been established. # Use the regex for example: "TCP <ip>:\d+ .*" (without '->') lsof_ret = subprocess.run(["lsof", "-i", "-nP", "-a", "-p", str(pid)], - capture_output=True, check=True).stdout + stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=True).stdout plpy.info( f'Checking postgres backend {pid}, ' \ f'lsof output:\n{os.linesep.join(map(str, lsof_ret.splitlines()))}') --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
