def waitForTestToReachUnconfiguredState(connection, sessionUrl): ''' This method waits for the current test to reach the 'Unconfigured' state. This is required in order to make sure that the test, after finishing the run, completes the Clean Up process before the IxLoad session is closed. Args: - connection is the connection object that manages the HTTP data transfers between the client and the REST API - sessionUrl is the address of the session that should run the test. ''' while getTestCurrentState(connection, sessionUrl) != kTestStateUnconfigured: time.sleep(0.1)