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

jest-worker's test do not pass when run in worker-farm #4745

Closed
SimenB opened this issue Oct 22, 2017 · 4 comments
Closed

jest-worker's test do not pass when run in worker-farm #4745

SimenB opened this issue Oct 22, 2017 · 4 comments
Assignees

Comments

@SimenB
Copy link
Member

SimenB commented Oct 22, 2017

Do you want to request a feature or report a bug?
Either code bug or infrastructure bug

What is the current behavior?
packages/jest-worker/src/__tests__/child.test.js does not pass when doing a full test run locally. It passes on CI as that's run using --runInBand. It also passes locally if you just run that test.

If the current behavior is a bug, please provide the steps to reproduce and either a repl.it demo through https://repl.it/languages/jest or a minimal repository on GitHub that we can yarn install and yarn test.
On current jest master (7db15f0)

$ ./jest worker --no-cache
 PASS  packages/jest-worker/src/__tests__/worker.test.js
 FAIL  packages/jest-worker/src/__tests__/child.test.js
  ● lazily requires the file

    TypeError: Cannot read property 'concat' of undefined

      at handle (node_modules/worker-farm/lib/child/index.js:44:24)

 PASS  packages/jest-worker/src/__tests__/index.test.js
 PASS  packages/jest-haste-map/src/__tests__/worker.test.js
 PASS  packages/jest-config/src/__tests__/get_max_workers.test.js
 PASS  packages/jest-cli/src/reporters/__tests__/coverage_worker.test.js

Test Suites: 1 failed, 5 passed, 6 total
Tests:       1 failed, 41 passed, 42 total
Snapshots:   0 total
Time:        4.12s
Ran all test suites matching /worker/i.

This is also reported in #4630

/cc @mjesun as you wrote the test.

What is the expected behavior?
Test should pass

Please provide your exact Jest configuration and mention your Jest, node, yarn/npm version and operating system.
jest@7db15f0, node@8.6.0/node@6.11.4/node@4.8.4, yarn@1.2.1, macOS High Sierra

@SimenB SimenB changed the title jest-worker's test do not run when run in worker-farm jest-worker's test do not pass when run in worker-farm Oct 22, 2017
@SimenB
Copy link
Member Author

SimenB commented Oct 22, 2017

A fix might be to drop worker-farm completely for jest-worker?

Line throwing in worker-farm: https://github.com/rvagg/node-worker-farm/blob/1ee4adb56f7c78eb1f840d58586194e0a4c7474a/lib/child/index.js#L44

@mjesun
Copy link
Contributor

mjesun commented Oct 24, 2017

Yeah, this bug is really weird. It looks that the child processes executing the tests get messed up with something; probably process.send. I'm fine deleting the test until we find out what it is; I will get some time to work on that next week.

@mjesun
Copy link
Contributor

mjesun commented Dec 6, 2017

Fixed in #5027.

@mjesun mjesun closed this as completed Dec 6, 2017
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants