From aa567a5f2dded13c24e12f3e88123be7883338dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Tue, 16 Oct 2018 19:12:33 -0400 Subject: [PATCH] print out connString and opts --- src/database/mongo/pubsub.js | 7 ++++--- test/mocks/databasemock.js | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/database/mongo/pubsub.js b/src/database/mongo/pubsub.js index 9d09784afb..d9b6e02d55 100644 --- a/src/database/mongo/pubsub.js +++ b/src/database/mongo/pubsub.js @@ -2,9 +2,10 @@ var mubsub = require('mubsub-nbb'); var db = require('../mongo'); - -var client = mubsub(db.getConnectionString(), db.getConnectionOptions()); +const connString = db.getConnectionString(); +const connOptions = db.getConnectionOptions(); +var client = mubsub(connString, connOptions); client.on('error', function (err) { - console.error('mongo pubsub error', err); + console.error('mongo pubsub error ' + connString, connOptions, err); }); module.exports = client.channel('pubsub'); diff --git a/test/mocks/databasemock.js b/test/mocks/databasemock.js index ded9280644..bf9416ae62 100644 --- a/test/mocks/databasemock.js +++ b/test/mocks/databasemock.js @@ -35,7 +35,7 @@ nconf.defaults({ if (!nconf.get('isCluster')) { nconf.set('isPrimary', 'true'); - nconf.set('isCluster', 'false'); + nconf.set('isCluster', 'true'); } var dbType = nconf.get('database');