Giter VIP home page Giter VIP logo

Comments (7)

Qard avatar Qard commented on August 24, 2024

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.

tj avatar tj commented on August 24, 2024

derp, could use this as well

from monk.

rauchg avatar rauchg commented on August 24, 2024

#58 (comment)

from monk.

hiddentao avatar hiddentao commented on August 24, 2024

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.

hiddentao avatar hiddentao commented on August 24, 2024

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.

hiddentao avatar hiddentao commented on August 24, 2024

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.

rauchg avatar rauchg commented on August 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.