-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Update Mongodb client to 2.2.4 #2329
Conversation
We also need to add a test to catch the bug/fix that was introduced in 2.1.19 which was what caused all those issue back then. |
@drew-gross you remember what the problem was? Reconnection issues? |
It might have been related to this? https://github.com/christkv/mongodb-core/issues/112 |
YEs seems like it, I need to drill down further to make sure our mongo adapter properly reconnects after losing the connection. |
@flovilmart updated the pull request. |
Tested with very short socketTimoutMS values and it's magic. |
- Just because this way we can let the adapter an opportunity to yield a new error.... OR A SUCCESS
377d5c4
to
b3671df
Compare
@flovilmart updated the pull request. |
@@ -65,6 +65,8 @@ describe('server', () => { | |||
expect(response.statusCode).toEqual(500); | |||
expect(body.code).toEqual(1); | |||
expect(body.message).toEqual('Internal server error.'); | |||
// Reconfigure with null so the next beforeEach don't fail trying to delete | |||
reconfigureServer({ databaseAdapter: null }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use reconfigureServer({ databaseAdapter: null }).then(done);
please, reconfigureServer
returns a promise.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK!
@flovilmart updated the pull request. |
@flovilmart updated the pull request. |
* chore(package): update mongodb to version 2.2.4 https://greenkeeper.io/ * fix for mongo 2.2.4 * Delete schema promise on error... - Just because this way we can let the adapter an opportunity to yield a new error.... OR A SUCCESS * Fixes test * Restore fix
* chore(package): update mongodb to version 2.2.4 https://greenkeeper.io/ * fix for mongo 2.2.4 * Delete schema promise on error... - Just because this way we can let the adapter an opportunity to yield a new error.... OR A SUCCESS * Fixes test * Restore fix
We needed to tweak a bit the test so the next beforeEach won't crash trying to delete all data with a broken connection as the new mongo client will fail.