#NEWLINE# def test_reserve_experiment_waiting_instances( self ) : #NEWLINE# #INDENT# 'Removes all the instances and then reserve' #NEWLINE# self . coordinator . mark_experiment_as_broken ( ExperimentInstanceId ( 'inst1' , 'exp1' , 'cat1' ) , [ 'err' ] ) #NEWLINE# self . coordinator . mark_experiment_as_broken ( ExperimentInstanceId ( 'inst2' , 'exp1' , 'cat1' ) , [ 'err' ] ) #NEWLINE# ( status , reservation1_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingInstancesQueueStatus ( reservation1_id , 0 ) #NEWLINE# self . assertEquals ( expected_status , status ) #NEWLINE# ( status , reservation2_id ) = self . coordinator . reserve_experiment ( ExperimentId ( 'exp1' , 'cat1' ) , DEFAULT_TIME , DEFAULT_PRIORITY , True , DEFAULT_INITIAL_DATA , DEFAULT_REQUEST_INFO , DEFAULT_CONSUMER_DATA ) #NEWLINE# expected_status = WSS . WaitingInstancesQueueStatus ( reservation2_id , 1 ) #NEWLINE# self . assertEquals ( expected_status , status )