summaryrefslogtreecommitdiff
path: root/jstests/sortg.js
diff options
context:
space:
mode:
authorGreg Studer <greg@10gen.com>2013-12-14 16:01:30 -0500
committerGreg Studer <greg@10gen.com>2013-12-16 14:49:01 -0500
commitb0cc3e092880c00cdbd531d88f38cb9e0a52d881 (patch)
treed26701d6c4ed9dc98891ab181d9eded0e8a0c083 /jstests/sortg.js
parent99dff054c8b83caf43c42d01b0497dcb0e1ee5bf (diff)
downloadmongo-b0cc3e092880c00cdbd531d88f38cb9e0a52d881.tar.gz
SERVER-11681 mongos upconverts all writes by default
Diffstat (limited to 'jstests/sortg.js')
-rw-r--r--jstests/sortg.js20
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.