def test_adding_experiment_instance_updates_waiting_users(self):

        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 )

        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.WaitingConfirmationQueueStatus(reservation2_id, DEFAULT_URL)
        self.assertEquals( expected_status, status )

        status, reservation3_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(reservation3_id, 0)
        self.assertEquals( expected_status, status )

        status, reservation4_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(reservation4_id, 1)
        self.assertEquals( expected_status, status )

        self.coordinator.add_experiment_instance_id("lab3:inst@machine", ExperimentInstanceId('inst3', 'exp1','cat1'), Resource("res_type", "res_inst4"))

        status = self.coordinator.get_reservation_status(reservation3_id)
        expected_status = WSS.WaitingConfirmationQueueStatus(reservation3_id, DEFAULT_URL)
        self.assertEquals( expected_status, status )

        status = self.coordinator.get_reservation_status(reservation4_id)
        expected_status = WSS.WaitingQueueStatus(reservation4_id, 0)
        self.assertEquals( expected_status, status )
If there are users waiting in the queue, and a new instance is added, then the queue is updated
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/test/unit/weblab/core/coordinator/test_coordinator.py/AbstractCoordinatorTestCase.test_adding_experiment_instance_updates_waiting_users