def test_remove_current_user_frees_queue(self):

        self.coordinator.mark_experiment_as_broken(ExperimentInstanceId("inst2", "exp1","cat1"), ['err'])

        # Now there is a single experiment instance available. We reserve it:

        status, reservation1_id = self.coordinator.reserve_experiment(ExperimentId("exp1","cat1"), DEFAULT_TIME, DEFAULT_PRIORITY, True, DEFAULT_INITIAL_DATA, DEFAULT_REQUEST_INFO, DEFAULT_CONSUMER_DATA)
        expected_status = WSS.WaitingConfirmationQueueStatus(reservation1_id, DEFAULT_URL)
        self.assertEquals( expected_status, status )

        # Then we put other user in the queue:

        status, reservation2_id = self.coordinator.reserve_experiment(ExperimentId("exp1","cat1"), DEFAULT_TIME, DEFAULT_PRIORITY, True, DEFAULT_INITIAL_DATA, DEFAULT_REQUEST_INFO, DEFAULT_CONSUMER_DATA)
        expected_status = WSS.WaitingQueueStatus(reservation2_id, 0)
        next_waiting_status = expected_status
        self.assertEquals( expected_status, status )
        # And we finish the first reservation

        self.coordinator.finish_reservation(reservation1_id)
        # The second reservation should soon be in WaitingConfirmation status

        status = self.coordinator.get_reservation_status(reservation2_id)
        timeout = 1.0
        wait_time = 0.01
        counter = timeout / wait_time
        while status == next_waiting_status and counter >= 0:
            time_mod.sleep(wait_time)
            status = self.coordinator.get_reservation_status(reservation2_id)
            counter -= 1
        expected_status = WSS.WaitingConfirmationQueueStatus(reservation2_id, DEFAULT_URL)
        self.assertEquals( expected_status, status )
:param user: The screen_name of the user whom to return results for
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/test/unit/weblab/core/coordinator/test_coordinator.py/AbstractCoordinatorTestCase.test_remove_current_user_frees_queue--crossover with--dataset/ETHPy150Open shichao-an/twitter-photos/twphotos/photos.py/TwitterPhotos.__init__