Skip to content

Option to set the default port for StartForDebugging() #71

@dannyBies

Description

@dannyBies

I would like to be able to set a port when running StartForDebugging() as the current default port (27017) may be in use on my local machine which in turn causes my integration tests to fail.

I thought of two options on how to implement this, I'd be happy to create a PR if this is something that you want to add to Mongo2Go.

  • Add an optional parameter port which defaults to MongoDbDefaults.DefaultPort
  • Add an optional parameter searchForAvailablePort which defaults to false. When set to true it will use portPool.GetNextOpenPort() to find the next available open port.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions