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');