#NEWLINE# def test_wait_agentexecutening_long_test( self ) : #NEWLINE# #INDENT# self . mock_time . return_value = 0 #NEWLINE# event_stream = [ dict ( msg = dict ( operation = 'poll' , agent_id = 'alpha' ) , reply = dict ( operation = 'execute' , command = 'RUN' , start_at = ( STEP * 2 ) , expected_duration = ( STEP * 9 ) ) , time = 1 ) , dict ( msg = dict ( operation = 'reply' , agent_id = quorum_pkg . HEARTBEAT_AGENT ) , reply = dict ( operation = 'none' ) , time = ( STEP * 4 ) ) , dict ( msg = dict ( operation = 'reply' , agent_id = 'alpha' ) , reply = dict ( operation = 'none' ) , time = ( STEP * 9 ) ) ] #NEWLINE# quorum = make_quorum ( self . _message_queue_gen ( event_stream ) ) #NEWLINE# test_case = { #NEWLINE# #INDENT# 'alpha' : DummyExecutor ( duration = ( STEP * 9 ) ) , #NEWLINE# #UNINDENT# } #NEWLINE# result = quorum . execute ( test_case ) #NEWLINE# self . assertEqual ( result . keys ( ) , test_case . keys ( ) ) #NEWLINE# self . assertEqual ( 'ok' , result [ 'alpha' ] [ 'status' ] )