summaryrefslogtreecommitdiff
path: root/jstests/core/mr_errorhandling.js
diff options
context:
space:
mode:
Diffstat (limited to 'jstests/core/mr_errorhandling.js')
-rw-r--r--jstests/core/mr_errorhandling.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/jstests/core/mr_errorhandling.js b/jstests/core/mr_errorhandling.js
index c4e1137b4c6..1bd94bbd56e 100644
--- a/jstests/core/mr_errorhandling.js
+++ b/jstests/core/mr_errorhandling.js
@@ -2,31 +2,31 @@
t = db.mr_errorhandling;
t.drop();
-t.save( { a : [ 1 , 2 , 3 ] } )
-t.save( { a : [ 2 , 3 , 4 ] } )
+t.save( { a : [ 1 , 2 , 3 ] } );
+t.save( { a : [ 2 , 3 , 4 ] } );
m_good = function(){
for ( var i=0; i<this.a.length; i++ ){
emit( this.a[i] , 1 );
}
-}
+};
m_bad = function(){
for ( var i=0; i<this.a.length; i++ ){
emit( this.a[i] );
}
-}
+};
r = function( k , v ){
var total = 0;
for ( var i=0; i<v.length; i++ )
total += v[i];
return total;
-}
+};
res = t.mapReduce( m_good , r , "mr_errorhandling_out" );
assert.eq( { 1 : 1 , 2 : 2 , 3 : 2 , 4 : 1 } , res.convertToSingleObject() , "A" );
-res.drop()
+res.drop();
res = null;
@@ -44,6 +44,6 @@ assert( theerror.indexOf( "emit" ) >= 0 , "B3" );
// test things are still in an ok state
res = t.mapReduce( m_good , r , "mr_errorhandling_out" );
assert.eq( { 1 : 1 , 2 : 2 , 3 : 2 , 4 : 1 } , res.convertToSingleObject() , "A" );
-res.drop()
+res.drop();
-assert.throws( function(){ t.mapReduce( m_good , r , { out : "xxx" , query : "foo" } ); } )
+assert.throws( function(){ t.mapReduce( m_good , r , { out : "xxx" , query : "foo" } ); } );