Skip to content
This repository has been archived by the owner on Nov 15, 2020. It is now read-only.

Commit

Permalink
fix datajack properties for mongo provider
Browse files Browse the repository at this point in the history
  • Loading branch information
Сидоченко Виктор Викторович authored and Сидоченко Виктор Викторович committed Oct 1, 2018
1 parent bc90e01 commit 0804d0e
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package ru.sbtqa.tag.pagefactory.support.data;

import com.mongodb.DB;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientURI;
import org.slf4j.Logger;
Expand Down Expand Up @@ -45,9 +46,9 @@ public static TestDataProvider getDataProvider() throws DataException {
);
break;
case "mongo":
testDataProvider = new MongoDataProvider(
new MongoClient(new MongoClientURI(Props.get("data.uri"))).getDB("data.db"),
Props.get("data.initial.collection")
MongoClient mongoclient = new MongoClient(new MongoClientURI(Props.get("data.uri")));
DB db = mongoclient.getDB(Props.get("data.db"));
testDataProvider = new MongoDataProvider(db, Props.get("data.initial.collection")
);
break;
case "stash":
Expand Down

0 comments on commit 0804d0e

Please sign in to comment.