#NEWLINE# def test_requeue_on_error( rabbit_manager , rabbit_config , start_containers ) : #NEWLINE# #INDENT# vhost = rabbit_config [ 'vhost' ] #NEWLINE# start_containers ( RequeueingHandler , ( 'requeue' , ) ) #NEWLINE# queue = rabbit_manager . get_queue ( vhost , 'evt-srcservice-eventtype--requeue.handle' ) #NEWLINE# assert ( len ( queue [ 'consumer_details' ] ) == 1 ) #NEWLINE# exchange_name = 'srcservice.events' #NEWLINE# rabbit_manager . publish ( vhost , exchange_name , 'eventtype' , '"msg"' , properties = dict ( content_type = 'application/json' ) ) #NEWLINE# with eventlet . timeout . Timeout ( EVENTS_TIMEOUT ) : #NEWLINE# #INDENT# while ( len ( events ) < 2 ) : #NEWLINE# #INDENT# eventlet . sleep ( ) #NEWLINE# #UNINDENT# #UNINDENT# assert ( len ( services [ 'requeue' ] ) > 1 ) #NEWLINE# for service in services [ 'requeue' ] : #NEWLINE# #INDENT# assert ( service . events == [ 'msg' ] )