From 94000a231bc4dfc848492bba25d9ef92171cd445 Mon Sep 17 00:00:00 2001 From: Akash Mahapatra Date: Fri, 10 Aug 2018 04:54:44 +0530 Subject: [PATCH] remove connection issue changed unit testing for error - topology is closed --- activity/mongodb/activity_test.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/activity/mongodb/activity_test.go b/activity/mongodb/activity_test.go index b7d570af..b61e5b22 100644 --- a/activity/mongodb/activity_test.go +++ b/activity/mongodb/activity_test.go @@ -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 }