Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--race appears to be non-functional #237

Open
slavistan opened this issue Jul 5, 2022 · 2 comments
Open

--race appears to be non-functional #237

slavistan opened this issue Jul 5, 2022 · 2 comments

Comments

@slavistan
Copy link

I'm running into trouble using run-p -r .... Using this package.json, executing npm x run-p -r sleep2 sleep4 (on a *nix host) should start two sleepers which should both terminate after two seconds. The expected output is wakey wakey as the 4-second sleeper should be terminated right after the first one finishes.

{
 ...
  "scripts": {
    "sleep2": "sleep 2 && echo wakey wakey",
    "sleep4": "sleep 4 && echo rise and shine"
  },
 ...
}

However, I have to wait the full 4 seconds for the run-p command to terminate and rise and shine is printed as well. According to my understanding of what run-p -r is supposed to do this is unexpected. Kindly correct me if I'm wrong.

This may be related to #139, although sleep certainly is not misbehaving :)

@webartoli
Copy link

webartoli commented Feb 27, 2024

Same issue here:

I'm trying to setup storybook tests that requires a live webserver during the test process.

{
  // ...
  "scripts": {
    "test:sb": "run-p --race --print-label test:sb:*",
    "test:sb:server": "http-server storybook-static --port 6006 --silent",
    "test:sb:runner": "wait-on -t 1m tcp:6006 && test-storybook --junit"
    // ...
  }
}

On windows client running npm run test:sb works as expected.
On ci runner (gitlab-ci, docker agent, node:lts-slim) running the same command the server keep alive.

@webartoli
Copy link

Solved installing package procps.
I have figured out that on *nix package an additional package procps is required and can be installed with:

# debian/ubuntu based distro
$ [sudo] apt install -y procps

# alpine based distro
$ apk add -y procps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants