This repository has been archived by the owner on Jan 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 131
mongodb config does not seem to wait for the connection to resolve #253
Comments
I think adding something like before(() => app.get('mongoClient')); In the tests should also wait for the client to connect and run your tests reliably. |
These are not mocha tests, rather some test apps. I think this should at least be documented as its a time sink to track down. |
I wonder if there is a good way for the generator to wait for the connection before starting the server. |
That is the conundrum. One positive point is that MongoDB can only be used on the server. Can anything be done with async/await? |
This issue was moved to feathersjs/feathers#996 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The relevent code in src/services/monododb.js is
My test apparently used a mongodb service before the connection was established. It looks like it threw because
app.service(...)
was undefined. It did not throw once I delayed the test with a setTimeout.I think the main concern is that an app using mongodb may sometimes boot and sometimes not.
The text was updated successfully, but these errors were encountered: