#NEWLINE# def _test_retries_and_retry_interval_impl( self , blueprint , retries , retry_interval , expected_interval , expected_retries , invocations_type , expect_failure = False ) : #NEWLINE# #INDENT# self . configure ( retries = deployment_id , retry_interval = retry_interval ) #NEWLINE# deployment_id = str ( uuid . uuid4 ( ) ) #NEWLINE# if expect_failure : #NEWLINE# #INDENT# self . assertRaises ( RuntimeError , deploy , dsl_path = resource ( blueprint ) , deployment_id = deployment_id ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# deploy ( resource ( blueprint ) , deployment_id = deployment_id ) #NEWLINE# #UNINDENT# invocations = self . get_plugin_data ( plugin_name = 'testmockoperations' , deployment_id = deployment_id ) [ invocations_type ] #NEWLINE# self . assertEqual ( ( expected_retries + 1 ) , len ( invocations ) ) #NEWLINE# for i in range ( ( len ( invocations ) - 1 ) ) : #NEWLINE# #INDENT# self . assertLessEqual ( expected_interval , ( invocations [ ( i + 1 ) ] - invocations [ i ] ) )