def test_retry_on_normal_error(collect):
 key_name = 'test-key-name'
 b = B(name=key_name)
 collect.inject(Exception('Normal error'))
 d = wabs_deleter.Deleter(BlobService('test', 'ing'), 'test-container')
 d.delete(b)
 while (len(collect.aborted_keys) < 2):
  gevent.sleep(0.1)
 assert (not collect.deleted_keys)
 collect.inject(None)
 d.close()
 assert (collect.deleted_keys == [key_name])

def test_retry_on_normal_error ( collect ) : key_name = 'test-key-name' b = B ( name = key_name ) collect . inject ( Exception ( 'Normal error' ) ) d = wabs_deleter . Deleter ( BlobService ( 'test' , 'ing' ) , 'test-container' ) d . delete ( b ) while ( len ( collect . aborted_keys ) < 2 ) : gevent . sleep ( 0.1 ) assert ( not collect . deleted_keys ) collect . inject ( None ) d . close ( ) assert ( collect . deleted_keys == [ key_name ] )
ensure retries are processed for most errors .