databricks-cli/acceptance/daemon/child-detaches/script

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

22 lines
720 B
Plaintext
Raw Normal View History

2025-02-17 18:23:02 +00:00
export DATABRICKS_CLI_SELFTEST_CHILD_OUTPUT_FILE="out.parentchild.txt"
2025-02-18 12:14:29 +00:00
$CLI selftest parent > "out.parentchild.txt"
2025-02-17 18:23:02 +00:00
2025-02-18 12:14:29 +00:00
echo "[script] waiting for child process to end..."
echo -n "[script]"
2025-02-17 18:23:02 +00:00
wait_pid $(cat ./child.pid)
2025-02-17 18:38:33 +00:00
rm ./child.pid
2025-02-18 13:49:24 +00:00
# README:
# This test validates two features of libs/daemon:
# 1. The parent process does not wait for the child process to end.
# 2. The child process correctly receives input from the parent process.
#
2025-02-18 13:52:25 +00:00
# Property (1) is validated because the child process waits for its parent process
2025-02-18 13:49:24 +00:00
# to end before it writes to stdout.
#
# Property (2) is directly validated by the output of the child process.
#
# See the code for "selftest parent" and "selftest child" commands for more details.