@@ -217,8 +217,7 @@ printjson(request = {insert : "system.indexes",
217217printjson ( result = coll . runCommand ( request ) ) ;
218218assert ( result . ok ) ;
219219assert . eq ( 1 , result . n ) ;
220- // Background index may or may not be created
221- assert . lte ( coll . getIndexes ( ) . length , 2 ) ;
220+ assert . eq ( coll . getIndexes ( ) . length , 2 ) ;
222221
223222//
224223// Duplicate index insertion gives n = 0
@@ -241,17 +240,15 @@ printjson(request = {insert : "system.indexes",
241240 key : { x : 1 } , name : "x_1" , unique : true } ] } ) ;
242241printjson ( result = coll . runCommand ( request ) ) ;
243242assert ( ! result . ok ) ;
244- //This is LTE since we may or may not actually create the database
245- assert . lte ( coll . getIndexes ( ) . length , 1 ) ;
243+ assert . eq ( coll . getIndexes ( ) . length , 0 ) ;
246244
247245//
248246// Empty index insertion
249247coll . drop ( ) ;
250248printjson ( request = { insert : "system.indexes" , documents : [ { } ] } ) ;
251249printjson ( result = coll . runCommand ( request ) ) ;
252250assert ( ! result . ok ) ;
253- // This is LTE since we may or may not actually create the database
254- assert . lte ( coll . getIndexes ( ) . length , 1 ) ;
251+ assert . eq ( coll . getIndexes ( ) . length , 0 ) ;
255252
256253//
257254// Invalid index desc
@@ -293,6 +290,5 @@ printjson(request = {insert : "system.indexes",
293290 { ns : coll . toString ( ) , key : { y : 1 } , name : "y_1" } ] } ) ;
294291printjson ( result = coll . runCommand ( request ) ) ;
295292assert ( ! result . ok ) ;
296- // This is LTE since we may or may not actually create the database
297- assert . lte ( coll . getIndexes ( ) . length , 1 ) ;
293+ assert . eq ( coll . getIndexes ( ) . length , 0 ) ;
298294
0 commit comments