Skip to content

Conversation

@mtraina
Copy link

@mtraina mtraina commented May 19, 2016

The error on some missing dependency have been fixed and tested using travis.

lazy val mongoClient = new MongoClient(new ServerAddress(network.getServerAddress(), network.getPort()));
def getConn = {
val driver = new MongoDriver
val db = driver.connection(List(s"127.0.0.1:${network.getPort}"))("testdb")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Calling "apply" is deprecated, better use "database" method.
Hardcoding the name "testdb" is creating a restriction on database name. It seems like there's no way of getting database names in ReactiveMongo, I couldn't find any API through brief googling. Maybe we should use MongoClient here.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ReactiveMongo gives an opportunity to run a custom command, so there is a way to get a list of all databases. I've made a pull request with an implementation of such a command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants