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

expresso hangs...assert.response #134

Open
gitfy opened this issue Sep 22, 2011 · 5 comments
Open

expresso hangs...assert.response #134

gitfy opened this issue Sep 22, 2011 · 5 comments

Comments

@gitfy
Copy link

gitfy commented Sep 22, 2011

Hi,
All my tests are based on assert.response. But for some reason, the expresso command never gracefully shutdown with results.

After executing all the tests, it kind of hangs. Don't know whether, something has to be done in the last test to trigger a shutdown.

When i do a CRTL-C, it exits with 100%.

What might be the issue here ?

Any help.

Thanks.

@kkaefer
Copy link
Contributor

kkaefer commented Sep 23, 2011

This could be because of something else in your code that prevents node from exiting. setTimeout/setInterval or IO such as open network connections or file streams keep the node process running. Unfortunately, I'm not aware of a good way to find out what is preventing node from exiting.

@cwu
Copy link

cwu commented Oct 30, 2011

I'm suffering from the same issues (probably from open redis clients). Where would there be a good place to close these open network connections?

@kkaefer
Copy link
Contributor

kkaefer commented Oct 30, 2011

@cwu, I'm not aware of a good place to do this :( Expresso needs a way for tests to signal that they completed so that it could run a shutdown function. However, there currently isn't such a facility.

@ericsorenson
Copy link

I'm having the same problem stemming from mongoose.js connections to MongoDB. Everything hangs until I send a CRTL-C.

@pschumi
Copy link

pschumi commented Nov 22, 2011

setTimeout(function() { process.exit(0) }, 1000*numSecs); seems to work (added as a test case) but it's quite a dirty solution. Adding clean connection close doesn't help.

I think that nodejs checks reserved resources at some point (I guess when the last function is called not counting callbacks) but if it cannot exit the check isn't done anymore. So there is hiding bug...or should we call it as feature? :) Anyway it seems that the problem isn't expresso it's nodejs.

You can try to write NodeJS script with i.e. MongoDB functionality and there is the same problem.

Have anyone tested this with 0.6.x?

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

5 participants