#NEWLINE# @ staticmethod #NEWLINE# def wait_until_objects_created( obj_list , check_func , timeout ) : #NEWLINE# #INDENT# obj_list = obj_list [ : ] #NEWLINE# waiting = 0 #NEWLINE# delay = 1 #NEWLINE# while ( waiting < timeout ) : #NEWLINE# #INDENT# for obj in obj_list [ : ] : #NEWLINE# #INDENT# args = ( obj if isinstance ( obj , tuple ) else ( obj , ) ) #NEWLINE# if check_func ( * args ) : #NEWLINE# #INDENT# obj_list . remove ( obj ) #NEWLINE# #UNINDENT# #UNINDENT# if ( not obj_list ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# time . sleep ( delay ) #NEWLINE# waiting += delay #NEWLINE# delay *= 2 #NEWLINE# #UNINDENT# msg = 'Objects {0} has not become in active state after timeout.' #NEWLINE# raise RuntimeError ( msg . format ( obj_list ) )