Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix smal oplog test

  • Loading branch information...
commit 774bb188f63a00b9936d3334edd56cafb16ffb8d 1 parent d14cb30
@erh erh authored
Showing with 7 additions and 5 deletions.
  1. +4 −3 jstests/mr_index.js
  2. +3 −2 jstests/mr_index2.js
View
7 jstests/mr_index.js
@@ -4,6 +4,7 @@ t.drop()
outName = "mr_index_out"
out = db[outName]
+out.drop()
t.insert( { tags : [ 1 ] } )
t.insert( { tags : [ 1 , 2 ] } )
@@ -26,17 +27,17 @@ ex = function(){
return out.find().sort( { value : 1 } ).explain()
}
-t.mapReduce( m , r , { out : outName } )
+res = t.mapReduce( m , r , { out : outName } )
assert.eq( "BasicCursor" , ex().cursor , "A1" )
out.ensureIndex( { value : 1 } )
assert.eq( "BtreeCursor value_1" , ex().cursor , "A2" )
assert.eq( 3 , ex().n , "A3" )
-t.mapReduce( m , r , { out : outName } )
+res = t.mapReduce( m , r , { out : outName } )
assert.eq( "BtreeCursor value_1" , ex().cursor , "B1" )
assert.eq( 3 , ex().n , "B2" )
-
+res.drop()
View
5 jstests/mr_index2.js
@@ -9,13 +9,14 @@ reduce = function(k,vals) { return Array.sum( vals ); }
res = t.mapReduce(map,reduce, { query : {} })
assert.eq( 1 ,res.counts.input , "A" )
-
+res.drop()
res = t.mapReduce(map,reduce, { query : { arr: {$gte:0} } })
assert.eq( 1 ,res.counts.input , "B" )
+res.drop()
t.ensureIndex({arr:1})
res = t.mapReduce(map,reduce, { query : { arr: {$gte:0} } })
assert.eq( 1 ,res.counts.input , "C" )
-
+res.drop();
Please sign in to comment.
Something went wrong with that request. Please try again.