Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3068

Specs Fail When Using Non-Standard Port for mongod

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.1.5
    • Component/s: None
    • Labels:

      Description

      I've been unable to run the specs because Mongoid is attempting to use the standard mongod port and I'm running Mongo on a non-standard port. I've tried setting the MONGOID_SPEC_PORT environment variable, but it doesn't seem to affect the outcome one bit. Every test failure is because of a Moped connection issue:

      Moped::Errors::ConnectionFailure:
             Could not connect to any secondary or primary nodes for replica set <Moped::Cluster nodes=[<Moped::Node resolved_address="127.0.0.1:27017">]>
      

      It appears the default session is using 27017 as a hardcoded port value and that causes a lot of the failures - changing this to my port fixes some of the issues, but I believe it's hardcoded elsewhere as I get the same error for different tests.

      Am I missing something really obvious here or are the tests not designed to work on non-standard ports? I'd be happy to work on a PR to solve this issue if someone can provide some guidance.

        Attachments

          Activity

            People

            Assignee:
            durran Durran Jordan
            Reporter:
            todd Todd Blose
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: