-
Notifications
You must be signed in to change notification settings - Fork 764
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
On ECONNRESET, assert()
calls undefined res.status
which throws an error
#258
Comments
Same here. During a stress test mongoose connection limit is reached and node is sending an empty result. So i get same exception. My temporary Solution: Test.prototype.assert = function(resError, res, fn){ |
…ng an uncaught error
Fixes #258, handles undefined Response object rather than throwing an…
I'm having this issue as well on Windows 7. I've described my experiences with this issue here #230 |
Removes a duplicate User CRUD test for Profile Picture. There are two reasons for this commit. 1) Duplicate of https://github.com/meanjs/mean/blob/master/modules/users/tests/server/user.server.routes.tests.js#L833-L848 2) This test is problematic in Windows environment. Related to: ladjs/supertest#230 ladjs/supertest#258 The latter may be an issue with the `.attach` method not completely loading the file into memory before the 400 status response is sent back due to no User logged in.
@kadishmal , @mleanos - any resolution to this? if you could help me with 298 . thanks ! |
No, this particular issue is still present. |
@kadishmal - thanks for the update. Do you know ETA for this fix; or know if supertest is working towards a fix? My issue is similar to this : #298 |
It's quite an old thread and it is closed, but I still encounter this issue. It is reproduced on Windows only and when I send a PUT with binary content with content-type set to a different value. |
Removes a duplicate User CRUD test for Profile Picture. There are two reasons for this commit. 1) Duplicate of https://github.com/meanjs/mean/blob/master/modules/users/tests/server/user.server.routes.tests.js#L833-L848 2) This test is problematic in Windows environment. Related to: ladjs/supertest#230 ladjs/supertest#258 The latter may be an issue with the `.attach` method not completely loading the file into memory before the 400 status response is sent back due to no User logged in.
Removes a duplicate User CRUD test for Profile Picture. There are two reasons for this commit. 1) Duplicate of https://github.com/meanjs/mean/blob/master/modules/users/tests/server/user.server.routes.tests.js#L833-L848 2) This test is problematic in Windows environment. Related to: ladjs/supertest#230 ladjs/supertest#258 The latter may be an issue with the `.attach` method not completely loading the file into memory before the 400 status response is sent back due to no User logged in.
When for some reason the remote server fails and the connection is reset,
supertest
cannot handle the error properly which is why the following error is thrown:There is this code on line 202 in
supertest/lib/test.js
:On the line 203, which says
if (res.status !== status) {
,res
is undefined. BecauseresError = { [Error: socket hang up] code: 'ECONNRESET', response: undefined }
.The text was updated successfully, but these errors were encountered: