diff options
author | Jonathan Reams <jbreams@mongodb.com> | 2015-11-09 10:35:12 -0500 |
---|---|---|
committer | Jonathan Reams <jbreams@mongodb.com> | 2015-11-11 11:12:17 -0500 |
commit | 338f764be00c3a5cef387dd1ba8a56671fc4ef6b (patch) | |
tree | 361281c805e0230d5227d5c433d0b29bc6258693 /jstests/tool | |
parent | 17b1cdd81328e94c03d97860ec5688028e0f6c22 (diff) | |
download | mongo-338f764be00c3a5cef387dd1ba8a56671fc4ef6b.tar.gz |
SERVER-6102 Deserialize BSON undefined as JS undefined
Diffstat (limited to 'jstests/tool')
-rw-r--r-- | jstests/tool/exportimport1.js | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/jstests/tool/exportimport1.js b/jstests/tool/exportimport1.js index a7a7bcee90c..451078e1b95 100644 --- a/jstests/tool/exportimport1.js +++ b/jstests/tool/exportimport1.js @@ -19,12 +19,7 @@ assert.eq( 1 , c.count() , "after restore 2" ); var doc = c.findOne(); assert.eq( 22 , doc.a , "after restore 2" ); for (var i=0; i<arr.length; i++) { - if (typeof arr[i] == 'undefined') { - // null should be { "$undefined" : true }, but this is a workaround for SERVER-6102 - assert.eq( null, doc.b[i] , "after restore array: "+i ); - } else { - assert.eq( arr[i], doc.b[i] , "after restore array: "+i ); - } + assert.eq( arr[i], doc.b[i] , "after restore array: "+i ); } // now with --jsonArray @@ -54,12 +49,7 @@ assert.soon( "c.findOne()" , "no data after sleep" ); assert.eq( 1 , c.count() , "after restore 2" ); var doc = c.findOne(); for (var i=0; i<arr.length; i++) { - if (typeof arr[i] == 'undefined') { - // null should be { "$undefined" : true }, but this is a workaround for SERVER-6102 - assert.eq( null, doc.a[i] , "after restore array: "+i ); - } else { - assert.eq( arr[i], doc.a[i] , "after restore array: "+i ); - } + assert.eq( arr[i], doc.a[i] , "after restore array: "+i ); } |