@@ -122,25 +122,21 @@ def insert_command():
122
122
]
123
123
ops_require_34 = [
124
124
('aggregate' , lambda : coll .aggregate ([{'$out' : 'out' }])),
125
+ # SERVER-46668 Delete all the documents in the collection to
126
+ # workaround a hang in createIndexes.
127
+ ('delete_many' , lambda : coll .delete_many ({})),
128
+ ('create_index' , lambda : coll .create_index ([('a' , DESCENDING )])),
129
+ ('create_indexes' , lambda : coll .create_indexes ([IndexModel ('b' )])),
130
+ ('drop_index' , lambda : coll .drop_index ([('a' , DESCENDING )])),
125
131
('create' , lambda : db .create_collection ('new' )),
126
132
('rename' , lambda : coll .rename ('new' )),
127
133
('drop' , lambda : db .new .drop ()),
128
134
]
129
135
if client_context .version > (3 , 4 ):
130
136
ops .extend (ops_require_34 )
131
- # SERVER-34776 : dropDatabase does not respect wtimeout in 3.6.
137
+ # SERVER-47194 : dropDatabase does not respect wtimeout in 3.6.
132
138
if client_context .version [:2 ] != (3 , 6 ):
133
139
ops .append (('drop_database' , lambda : client .drop_database (db )))
134
- # SERVER-46668: createIndexes does not respect wtimeout in 4.4+.
135
- if client_context .version <= (4 , 3 ):
136
- ops .extend ([
137
- ('create_index' ,
138
- lambda : coll .create_index ([('a' , DESCENDING )])),
139
- ('create_indexes' ,
140
- lambda : coll .create_indexes ([IndexModel ('b' )])),
141
- ('drop_index' ,
142
- lambda : coll .drop_index ([('a' , DESCENDING )])),
143
- ])
144
140
145
141
for name , f in ops :
146
142
# Ensure insert_many and bulk_write still raise BulkWriteError.
0 commit comments