Skip to content

test(cli): commands test cleanup cannot stop helpers the CLI starts in their own process groups #288

Closed

Description

@ElbertePlinio

Found while fixing review findings on #286 (#262).

The commands test cleanup now waits at most 20 s for running CLI calls, SIGKILLs the process group of any survivor, and then runs session destroy --all. The product starts helpers such as adb in their own process groups (runCommand in packages/core/src/proc.ts), so the group kill does not reach them. In an experiment, a fake adb running sleep 300 outlived cleanup until a later test killed it. Session processes are still destroyed, and real test helpers are short-lived, but a stuck helper would outlive the test. The cleanup's own session destroy --all also has no time limit.

  • Stop helpers left by a killed CLI, for example by matching the test's PICKFORGE_HOME in the process environment
  • Bound the cleanup's session destroy --all
  • Reproduce with a stuck fake helper and show nothing survives
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions