summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
authorRandolph Tan <randolph@10gen.com>2012-11-05 13:41:54 -0500
committerRandolph Tan <randolph@10gen.com>2012-11-05 14:35:52 -0500
commit8afcdc545d5d756900d6ffff43c9e06f90318bff (patch)
tree11af4c62edf7cfd3107029c5dacb6ae82044be44 /jstests
parenta3bba74665e0b03fd74612dabaaeac284f2a8bb4 (diff)
downloadmongo-8afcdc545d5d756900d6ffff43c9e06f90318bff.tar.gz
SERVER-7558 read_pref_cmd.js fails when calling inline map reduce
Added logs when command fails.
Diffstat (limited to 'jstests')
-rw-r--r--jstests/sharding/read_pref_cmd.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/jstests/sharding/read_pref_cmd.js b/jstests/sharding/read_pref_cmd.js
index 64dceeeed70..f383c771e7d 100644
--- a/jstests/sharding/read_pref_cmd.js
+++ b/jstests/sharding/read_pref_cmd.js
@@ -30,7 +30,7 @@ var doTest = function(conn, hostList) {
// Test command that can't be sent to secondary
var createResult = testDB.runCommand({ create: 'user' });
- assert(createResult.ok);
+ assert(createResult.ok, 'create cmd failed: ' + tojson(createResult));
testedAtLeastOnce = false;
hostList.forEach(function(node) {
@@ -52,7 +52,7 @@ var doTest = function(conn, hostList) {
var inlineMRResult = testDB.runCommand({ mapreduce: 'user', map: mapFunc,
reduce: reduceFunc, out: { inline: 1 }});
- assert(inlineMRResult.ok);
+ assert(inlineMRResult.ok, 'inline mr failed: ' + tojson(inlineMRResult));
testedAtLeastOnce = false;
hostList.forEach(function(node) {
@@ -70,7 +70,7 @@ var doTest = function(conn, hostList) {
testDB.runCommand({ create: 'mrIn' });
var outCollMRResult = testDB.runCommand({ mapreduce: 'mrIn', map: mapFunc,
reduce: reduceFunc, out: { replace: 'mrOut' }});
- assert(outCollMRResult.ok);
+ assert(outCollMRResult.ok, 'replace mr cmd failed: ' + tojson(outCollMRResult));
testedAtLeastOnce = false;
hostList.forEach(function(node) {