diff options
author | Greg Studer <greg@10gen.com> | 2013-12-14 16:01:30 -0500 |
---|---|---|
committer | Greg Studer <greg@10gen.com> | 2013-12-16 14:49:01 -0500 |
commit | b0cc3e092880c00cdbd531d88f38cb9e0a52d881 (patch) | |
tree | d26701d6c4ed9dc98891ab181d9eded0e8a0c083 /jstests/sortg.js | |
parent | 99dff054c8b83caf43c42d01b0497dcb0e1ee5bf (diff) | |
download | mongo-b0cc3e092880c00cdbd531d88f38cb9e0a52d881.tar.gz |
SERVER-11681 mongos upconverts all writes by default
Diffstat (limited to 'jstests/sortg.js')
-rw-r--r-- | jstests/sortg.js | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/jstests/sortg.js b/jstests/sortg.js index b93e85be428..44986ec1ddd 100644 --- a/jstests/sortg.js +++ b/jstests/sortg.js @@ -15,26 +15,20 @@ for( i = 0; i < 40; ++i ) { function memoryException( sortSpec, querySpec ) { querySpec = querySpec || {}; + var ex = assert.throws( function() { + t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).itcount() + } ); + assert( ex.toString().match( /sort/ ) ); assert.throws( function() { - t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).itcount() - } ); - assert( db.getLastError().match( /sort/ ) ); - assert.throws( function() { - t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).explain( true ) - } ); - assert( db.getLastError().match( /sort/ ) ); + t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).explain( true ) + } ); + assert( ex.toString().match( /sort/ ) ); } function noMemoryException( sortSpec, querySpec ) { querySpec = querySpec || {}; t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).itcount(); - if ( 0 ) { // SERVER-5016 - assert( !db.getLastError() ); - } t.find( querySpec ).sort( sortSpec ).batchSize( 1000 ).explain( true ); - if ( 0 ) { // SERVER-5016 - assert( !db.getLastError() ); - } } // Unindexed sorts. |