Skip to content

Commit

Permalink
remove connection issue
Browse files Browse the repository at this point in the history
changed unit testing for error - topology is closed
  • Loading branch information
Ganitagya authored and Frank Martinez committed Aug 13, 2018
1 parent adac5e1 commit 94000a2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion activity/mongodb/activity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,12 @@ var coll *mongo.Collection

func init() {
//todo implement shared sessions
client, err := mongo.NewClient(TEST_URI)
// client, err := mongo.NewClient(TEST_URI)

//To remove below error:
// data not inserted topology is closed

client, err := mongo.Connect(context.Background(), TEST_URI, nil)
if err != nil {
// warn and skip tests
}
Expand Down

0 comments on commit 94000a2

Please sign in to comment.