Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

test: run test faster #5440

Closed
wants to merge 1 commit into from

Conversation

robertkowalski
Copy link

instead of using a timeout events are emitted which resulted in a 0.7s
runtime instead of a 1.3s lasting one

instead of using a timeout events are emitted which resulted in a 0.7s
runtime instead of a 1.3s lasting one
@robertkowalski
Copy link
Author

Note: @isaacs mentions in #4932 that the usage of events instead of a timeout could make tests like this faster, however the fs.watch-Emitter does not emit a ready event like the new streams2 with readable so I used a custom event.

@bnoordhuis
Copy link
Member

I landed a fix in c5ed96a that lowers the timeout from 1000 to 10 ms. Should work okay because the call to setTimeout() is only there in order to start the watcher on a later tick. I guess I could've used setImmediate() instead but meh, whatever - 1 or 10 ms doesn't affect the total run time, that's still around 250 ms. Anyway, thanks for pointing out the issue. :-)

@robertkowalski robertkowalski deleted the test-faster branch September 1, 2013 14:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants