Comments (7)
No, replicasets with the mongodb:// prefix do not work. Auth details also don't work in replicaset urls, with or without the mongodb:// prefix. I'm looking at that now.
from monk.
derp, could use this as well
from monk.
from monk.
I'm in the process of adding connection error checking (#24). When I do so I notice that the replicaset connection tests fail with error Error: Could not locate any valid servers in initial seed list
. Both array
and string
versions fail.
Looking at Mongoskin's README it looks like you actually have to use the native lib's objects when defining a replica set:
var Server = mongo.Server;
var Db = mongo.Db;
var replSet = new ReplSetServers([
new Server('localhost', 30000),
new Server('localhost', 30001),
new Server('localhost', 30002),
]);
var db = new Db('integration_test_', replSet, {w:0, native_parser: (process.env['TEST_NATIVE'] != null)});
Do we need to update monk with this then?
from monk.
Actually that is't the problem - it works with a real replica set. The test fails because the servers specified in the test code aren't setup for replication.
from monk.
Another point I've realised is that a lot of the tests don't explicitly close db connections once done. And this also makes me wonder why connecting to a db isn't made to return a promise. Wouldn't it be nice to have that work the same as the rest of monk?
from monk.
Agreed
On Tue Jan 06 2015 at 1:49:14 AM Ramesh Nair [email protected]
wrote:
Another point I've realised is that a lot of the tests don't explicitly
close db connections once done. And this also makes me wonder why
connecting to a db isn't made to return a promise. Wouldn't it be nice to
have that work the same as the rest of monk?—
Reply to this email directly or view it on GitHub
#19 (comment).
from monk.
Related Issues (20)
- New mongodb driver will connected failed
- count deprecated HOT 1
- Incomplete/broken Types regarding 'CollectionOptions'
- Can we update MongoDb version? HOT 1
- [help] how get the array a array with users.find HOT 1
- MongoDB 4.4 support
- DeprecationWarning: Listening to events on the Db class has been deprecated and will be removed in the next major version HOT 14
- Return type of update() is incorrect HOT 3
- Can't get req.query.name to collection.find HOT 2
- MongoDB v4 support HOT 1
- bulkWrite return types are completely wrong
- DeprecationWarning: collection.findOneAndUpdate option [returnOriginal] is deprecated and will be removed in a later version.
- MongoDB 5.0 support HOT 1
- monk.findOneAndUpdate never resolves HOT 1
- collection.find() exits without throwing any error when user not found
- wrong/deprecated code on Docs
- There's nobody maintain this project? how to apply for maintainer?
- Cannot $set `length` field HOT 1
- monk not working with node v18.8 on windows 11 HOT 2
- Maintainance
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monk.