#NEWLINE# def test_delayed_executions_recovery( self ) : #NEWLINE# #INDENT# dt_now = date_utils . get_datetime_utc_now ( ) #NEWLINE# dt_delta = datetime . timedelta ( seconds = cfg . CONF . scheduler . delayed_execution_recovery ) #NEWLINE# dt_timeout = ( dt_now - dt_delta ) #NEWLINE# liveaction = LiveActionDB ( action = 'wolfpack.action-1' , parameters = { #NEWLINE# #INDENT# 'actionstr' : 'foo' , #NEWLINE# #UNINDENT# } , start_timestamp = dt_timeout , status = action_constants . LIVEACTION_STATUS_DELAYED ) #NEWLINE# liveaction = LiveAction . add_or_update ( liveaction , publish = False ) #NEWLINE# executions . create_execution_object ( dt_timeout , publish = False ) #NEWLINE# scheduler . recover_delayed_executions ( ) #NEWLINE# liveaction = LiveAction . get_by_id ( str ( liveaction . id ) ) #NEWLINE# self . assertEqual ( liveaction . status , action_constants . LIVEACTION_STATUS_SUCCEEDED )