mirror of https://github.com/databricks/cli.git
This commit is contained in:
parent
a4009ed6fa
commit
b130787318
|
@ -10,11 +10,18 @@ import (
|
|||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
// TODO: Manually test that indeed latency is not added.
|
||||
func newChildCommand() *cobra.Command {
|
||||
return &cobra.Command{
|
||||
Use: "child",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
// wait_pid lives in acceptance/bin. We expect this command to only be called
|
||||
// from acceptance tests.
|
||||
//
|
||||
// Note: The golang stdlib only provides a way to wait on processes
|
||||
// that are children of the current process. While it's possible to
|
||||
// rely on os native syscalls to wait on arbitrary processes, it's hard
|
||||
// to get right and unit test. So I opted to just rely on the wait_pid
|
||||
// script here.
|
||||
waitCmd := exec.Command("bash", "-euo", "pipefail", "wait_pid", os.Getenv(daemon.DatabricksCliParentPid))
|
||||
b, err := waitCmd.Output()
|
||||
if err != nil {
|
||||
|
|
Loading…
Reference in New Issue