def _wait_async_done(self, reservation_id, reqids):
        """
        _wait_async_done(session_id, reqids)
        Helper methods that waits for the specified asynchronous requests to be finished,
        and which asserts that they were successful. Note that it doesn't actually return
        their responses.
        @param reqids Tuple containing the request ids for the commands to check.
        @return Nothing
        """
        # Wait until send_async_file query is actually finished.
        reqsl = list(reqids)
        max_count = 15
        while len(reqsl) > 0:
            time.sleep(0.1)
            max_count -= 1
            if max_count == 0:
                raise Exception("Maximum time spent waiting async done")
            requests = self.client.check_async_command_status(reservation_id, tuple(reqsl))
            self.assertEquals(len(reqsl), len(requests))
            for rid, req in six.iteritems(requests):
                status = req[0]
                self.assertTrue(status in ("running", "ok", "error"))
                if status != "running":
                    self.assertEquals("ok", status, "Contents: " + req[1])
                    reqsl.remove(rid)
dataset/ETHPy150Open weblabdeusto/weblabdeusto/server/src/test/integration/general/test_no_concurrency.py/IntegrationNoConcurrencyTestCase._wait_async_done/original