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

Use PID based wsEndpoint file #103

Merged
merged 2 commits into from Aug 15, 2018
Merged

Use PID based wsEndpoint file #103

merged 2 commits into from Aug 15, 2018

Conversation

ghost
Copy link

@ghost ghost commented Aug 1, 2018

Allows multiple Jest processes to connect to their own chromium instances

Allows multiple Jest processes to connect to their own chromium instances
@ghost
Copy link
Author

ghost commented Aug 1, 2018

Issue #98 (comment)

@gregberge gregberge merged commit 4d37d17 into argos-ci:master Aug 15, 2018
@gregberge
Copy link
Member

Thanks!

@izorg
Copy link

izorg commented Aug 17, 2018

Looks like global setup WS_ENDPOINT_PATH is different from what PuppeteerEnvironment setup gets

@gregberge
Copy link
Member

@izorg what do you mean? Do you experience a bug?

@izorg
Copy link

izorg commented Aug 17, 2018

@neoziro yes, I got TypeError: Cannot read property 'removeListener' of undefined in 3.3.0 version. Output into the console the WS_ENDPOINT_PATH variable directly in node_modules folder from global.js & PuppeteerEnvironment.js and got different pid in the end. I can create a clean project to try to reproduce it if you can't reproduce it easily.

@gregberge
Copy link
Member

@izorg hmm yes it makes sense. Jest runs test in parallel so it can't work like that. I revert it.

gregberge added a commit that referenced this pull request Aug 17, 2018
@ghost
Copy link
Author

ghost commented Aug 17, 2018

I've looked into the problem with a clean repo and I realized the reason I did not get the error @izorg found was because I was running a single testFile. Jest runs each testFile in parallel and does so with separate child process with different pids. If there is only one testFile, it does not run the test in a child process so the PID of Globals and PuppeteerEnvironment continue to match.

addressed in #115

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

Successfully merging this pull request may close these issues.

2 participants