Skip to content

Pass promise library through to DB function #1294

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

Merged
merged 1 commit into from
Sep 14, 2015
Merged

Pass promise library through to DB function #1294

merged 1 commit into from
Sep 14, 2015

Conversation

RovingCodeMonkey
Copy link
Contributor

If the library is not properly passed, the underlying function attempts to use es-6 promises instead.
As I am not using that particular package, it crashes my app.

If the library is not properly passed, the underlying function attempts to use es-6 promises instead.
As I am not using that particular package, it crashes my app.
@christkv
Copy link
Contributor

christkv commented Sep 9, 2015

can you provide a failing test to go with this.

@RovingCodeMonkey
Copy link
Contributor Author

Providing a failing test is proving much more challenging than I anticipated.

The last test of the promises_db_tests.js comes closest.
Instantiating the connection and passing in the Bluebird promise library is exactly the functionality I was using.

As the initial instantiation of the DB which does not pass through the promise library seems to be a pre-flight run, before calling another instantiation (which does pass it through properly)

Under these conditions that test would fail.

Older version of node (So that global.Promise is undefined) I am uncertain of the exact version our Azure cloud was running, approximately 0.10.x

Es-6 promise library has not been included in the solution.

Since upgrading the version of Node on the server the issue no longer exists.

In the grand scheme of things unlikely to affect many people as long as they are running the new versions, or using the es-6 library.

@christkv christkv merged commit 9c9796d into mongodb:2.0 Sep 14, 2015
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

Successfully merging this pull request may close these issues.

2 participants