Skip to content

acceptance test hang, both with expresso and mocha #38

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

Closed
strk opened this issue Jul 12, 2012 · 10 comments
Closed

acceptance test hang, both with expresso and mocha #38

strk opened this issue Jul 12, 2012 · 10 comments
Labels

Comments

@strk
Copy link

strk commented Jul 12, 2012

both acceptance tests hang, with both expresso and mocha, must be some callback never being invoked...

@strk
Copy link
Author

strk commented Jul 13, 2012

It looks like it only hangs when the test runs against a PostgreSQL version < 9.0 -- may have to do with unhandled exceptions making the caller starve while waiting on a callback. Issue #26 might be related (isn't clear).

@strk
Copy link
Author

strk commented Jul 13, 2012

While app.test.js only hangs with wrong PostgreSQL, app.auth.test.js hangs anyway (maybe it's waiting for OAuth server)

strk pushed a commit that referenced this issue Jul 13, 2012
@strk
Copy link
Author

strk commented Jul 13, 2012

The hanging bug seems still related to the pg module, never invoking the callback on client.query. I'm using 0.6.14

@strk
Copy link
Author

strk commented Jul 13, 2012

Same issue with pg 0.6.18 and 0.7.2

@strk
Copy link
Author

strk commented Jul 13, 2012

I wonder if this has to do with the pg module being built against postgresql 8.4 libraries and trying to access 9.0 database

@strk
Copy link
Author

strk commented Jul 13, 2012

Hanging of app.test could be due to a bug in the node-postgresql project: brianc/node-postgres#137

@strk
Copy link
Author

strk commented Jul 13, 2012

On a reduced app.test.js I only get 6 issued requests over 7 calls to assert.response.
The bug may actually be in assert.response itself...

@strk
Copy link
Author

strk commented Jul 16, 2012

I've reduced an hanging testcase so to have nothing to do with CartoDB-SQL-API, nor express.
Could still be a NODE or MOCHA bug.
For node, I filed nodejs/node-v0.x-archive#3715

@strk
Copy link
Author

strk commented Jul 16, 2012

Found a workaround: adding "agent: false" in the http.request options in test/support/assert.js !

strk pushed a commit that referenced this issue Jul 16, 2012
@strk strk closed this as completed in 8fb6587 Jul 16, 2012
@strk
Copy link
Author

strk commented Jul 16, 2012

The other test was also having another kind of hanging, but it's been fixed with 8fb6587

So all done here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant