@@ -218,22 +218,20 @@ def check_query(query, collection1, collection2, projection=None, sort=None, lim
218218
219219
220220def test_update (collection1 , collection2 , verbose = False ):
221- okay = True
222- skip_current_iteration = False
223221 for i in range (1 , 10 ):
224222 exceptionOne = None
225223 exceptionTwo = None
226224 update = gen .random_update (collection1 )
227225
228- util .trace ('error ' , '\n ========== Update No.' , i , '==========' )
229- util .trace ('error ' , 'Query:' , update ['query' ])
230- util .trace ('error ' , 'Update:' , str (update ['update' ]))
231- util .trace ('error ' , 'Number results from collection: ' , gen .count_query_results (
226+ util .trace ('debug ' , '\n ========== Update No.' , i , '==========' )
227+ util .trace ('debug ' , 'Query:' , update ['query' ])
228+ util .trace ('debug ' , 'Update:' , str (update ['update' ]))
229+ util .trace ('debug ' , 'Number results from collection: ' , gen .count_query_results (
232230 collection1 , update ['query' ]))
233231 for item in collection1 .find (update ['query' ]):
234- util .trace ('error ' , 'Find Result1:' , item )
232+ util .trace ('debug ' , 'Find Result1:' , item )
235233 for item in collection2 .find (update ['query' ]):
236- util .trace ('error ' , 'Find Result2:' , item )
234+ util .trace ('debug ' , 'Find Result2:' , item )
237235
238236 try :
239237 if verbose :
@@ -265,21 +263,19 @@ def test_update(collection1, collection2, verbose=False):
265263 # or (exceptionOne is not None and exceptionTwo is not None and exceptionOne.code == exceptionTwo.code)):
266264 # TODO re-enable the exact error check.
267265 # TODO re-enable consistency check when failure happened
268- skip_current_iteration = True
269- return (True , skip_current_iteration )
266+ return (True , True )
270267 else :
271268 print 'Unmatched result: '
272269 print type (exceptionOne ), ': ' , str (exceptionOne )
273270 print type (exceptionTwo ), ': ' , str (exceptionTwo )
274- okay = False
275271 ignored_exception_check (exceptionOne )
276272 ignored_exception_check (exceptionTwo )
277- return (okay , skip_current_iteration )
273+ return (False , False )
278274
279275 if not check_query (dict (), collection1 , collection2 ):
280- return (False , skip_current_iteration )
276+ return (False , False )
281277
282- return (okay , skip_current_iteration )
278+ return (True , False )
283279
284280
285281class IgnoredException (Exception ):
0 commit comments