cbffac7df1
This test would previously only attempt to invoke a race between instance.save(expected_task_state=task_states.SPAWNING) and a parallel attempt to delete an instance when the instance also has a vm_state of ACTIVE and task_state of None. However vm_state and task_state would often be different within the test resulting in no attempt to invoke the test being made. As instance.save is only called with expected_task_state set to task_states.SPAWNING by _unshelve_instance and _build_and_run_instance we should just check for this and avoid any state races within the test. Additionally when attempting to invoke the race this test would call _wait_for_server_parameter and provide self.api. This change removes this argument as since I8c96b337f32148f8f5899c9b87af331b1fa41424 this is no longer required and will result in a `TypeError: 'TestOpenStackClient' object is not subscriptable` error. Closes-Bug: #1866072 Change-Id: I36da36cc5b099174eece0dfba29485fc20b2867b