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

TestCafe can't run tests if 'tests' argument is a directory with large number of files #1090

Closed
AlexanderMoskovkin opened this issue Dec 22, 2016 · 4 comments
Assignees
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: compiler TYPE: bug The described behavior is considered as wrong (bug).
Milestone

Comments

@AlexanderMoskovkin
Copy link
Contributor

Are you requesting a feature or reporting a bug?

bug

What is the current behavior?

testcafe chrome <directory-with-node_modules-and-tests>

Error: Cannot find a test source file at "...\node_modules\testcafe-legacy-api\node_modules\core0js\modules\$.property-desc.js"

What is the expected behavior?

It was ok on the previous version

Specify your

  • testcafe version: 0.12.0-alpha2
@AlexanderMoskovkin AlexanderMoskovkin added AREA: server SYSTEM: compiler TYPE: bug The described behavior is considered as wrong (bug). labels Dec 22, 2016
@AlexanderMoskovkin AlexanderMoskovkin added this to the Sprint #3 milestone Dec 22, 2016
@AlexanderMoskovkin AlexanderMoskovkin self-assigned this Dec 22, 2016
@AlexanderMoskovkin
Copy link
Contributor Author

I'm working on this

@AlexanderMoskovkin
Copy link
Contributor Author

I've found the cause of the problem.

When you pass to much files to compile (> 8000 in my case) the Compiler try to read and compile all of them at the same time (via Promise.all). As a result a EMFILE, too many open files error is raised here.

There are two ways to fix it:

  1. Create custom logic to not parse more than <some_count> files at the same time (for example 1000)
  2. Use graceful-fs

I prefer the second. @inikulin are you agree?

@AlexanderMoskovkin
Copy link
Contributor Author

It seems the second way doesn't work when files too much (about 30000). Also I don't think it a nice idea to try to read so much files at the same time

AlexanderMoskovkin added a commit to AlexanderMoskovkin/testcafe that referenced this issue Dec 23, 2016
@AlexanderMoskovkin AlexanderMoskovkin changed the title TestCafe can't run tests if 'tests' argument is a directory with node_modules TestCafe can't run tests if 'tests' argument is a directory with large number of files Jan 12, 2017
@lock
Copy link

lock bot commented Mar 29, 2019

This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow.

@lock lock bot added the STATE: Auto-locked An issue has been automatically locked by the Lock bot. label Mar 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Mar 29, 2019
kirovboris pushed a commit to kirovboris/testcafe-phoenix that referenced this issue Dec 18, 2019
…evExpress#1093)

* Split sources into chunks during compiling (closes DevExpress#1090)

* Add the comment
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
AREA: server STATE: Auto-locked An issue has been automatically locked by the Lock bot. SYSTEM: compiler TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

1 participant