Skip to content

PR #1219

PR #1219 #3570

GitHub Actions / JUnit Test Report failed Dec 11, 2024 in 0s

887 tests run, 867 passed, 6 skipped, 14 failed.

Annotations

Check failure on line 175 in app/tests/e2e/test_definitions.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_definitions.test_create_credential_definition_issuer_tenant[clean-clean-True]

app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f40343ac120>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f40343c3e60>
credential_definition_id = '32CoP1YDgoaq8voRXY623B:3:CL:3139:FQBII'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f40343dec40>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

schema_definition = CredentialSchema(id='Bo9W24g9VmLCnWopu5LJJm:2:test_schema:11.44.86', name='test_schema', version='11.44.86', attribute_names=['name', 'age', 'speed'])
faber_acapy_client = <aries_cloudcontroller.acapy_client.AcaPyClient object at 0x7f40364f5d30>
faber_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7f403438f110>
support_revocation = True

    @pytest.mark.anyio
    @pytest.mark.parametrize("support_revocation", [False, True])
    @pytest.mark.skipif(
        TestMode.regression_run in TestMode.fixture_params,
        reason=(
            "Mystery -- this test passes continuously if it's the only test, "
            "but it fails when run a 2nd time in regression mode"
        ),
    )
    async def test_create_credential_definition_issuer_tenant(
        schema_definition: CredentialSchema,
        faber_acapy_client: AcaPyClient,
        faber_client: RichAsyncClient,
        support_revocation: bool,
    ):
        credential_definition = CreateCredentialDefinition(
            schema_id=schema_definition.id,
            tag=random_string(5),
            support_revocation=support_revocation,
        )
    
        auth = acapy_auth_verified(
            acapy_auth_from_header(faber_client.headers["x-api-key"])
        )
    
        result = (
>           await definitions.create_credential_definition(
                credential_definition=credential_definition, auth=auth
            )
        ).model_dump()

app/tests/e2e/test_definitions.py:175: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f40343c3e60>
credential_definition_id = '32CoP1YDgoaq8voRXY623B:3:CL:3139:FQBII'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 98 in app/tests/e2e/issuer/test_save_exchange_record.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_save_exchange_record.test_issue_credential_with_save_exchange_record[clean-clean-clean-clean-clean-None]

Failed: DID NOT RAISE <class 'fastapi.exceptions.HTTPException'>
Raw output
faber_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7f27295980b0>
credential_definition_id = 'L18zrtNfQv19TRahcSjhYs:3:CL:3166:tag'
faber_and_alice_connection = FaberAliceConnect(alice_connection_id='93714133-4659-4759-b503-43cfb8dc0c49', faber_connection_id='49e339f3-7507-471b-9a53-94958b78db4e')
alice_member_client = <shared.util.rich_async_client.RichAsyncClient object at 0x7f2729599760>
save_exchange_record = None

    @pytest.mark.anyio
    @pytest.mark.parametrize("save_exchange_record", [None, False, True])
    async def test_issue_credential_with_save_exchange_record(
        faber_client: RichAsyncClient,
        credential_definition_id: str,
        faber_and_alice_connection: FaberAliceConnect,
        alice_member_client: RichAsyncClient,
        save_exchange_record: Optional[bool],
    ) -> CredentialExchange:
        credential = {
            "connection_id": faber_and_alice_connection.faber_connection_id,
            "indy_credential_detail": {
                "credential_definition_id": credential_definition_id,
                "attributes": sample_credential_attributes,
            },
            "save_exchange_record": save_exchange_record,
        }
    
        # create and send credential offer- issuer
        faber_send_response = (
            await faber_client.post(
                CREDENTIALS_BASE_PATH,
                json=credential,
            )
        ).json()
    
        faber_credential_exchange_id = faber_send_response["credential_exchange_id"]
        thread_id = faber_send_response["thread_id"]
    
        try:
            payload = await check_webhook_state(
                client=alice_member_client,
                topic="credentials",
                state="offer-received",
                filter_map={
                    "thread_id": thread_id,
                },
            )
    
            alice_credential_exchange_id = payload["credential_exchange_id"]
    
            # send credential request - holder
            await alice_member_client.post(
                f"{CREDENTIALS_BASE_PATH}/{alice_credential_exchange_id}/request",
            )
    
            await check_webhook_state(
                client=alice_member_client,
                topic="credentials",
                state="done",
                filter_map={
                    "credential_exchange_id": alice_credential_exchange_id,
                },
            )
    
            await asyncio.sleep(1)  # short sleep before fetching; allow records to update
    
            # faber requesting auto_remove only removes their cred ex records
            # get exchange record from alice side -- should not exist after complete
            with pytest.raises(HTTPException) as exc:
                await alice_member_client.get(
                    f"{CREDENTIALS_BASE_PATH}/{alice_credential_exchange_id}"
                )
            assert exc.value.status_code == 404
    
            if save_exchange_record:
                # get exchange records from faber side:
                faber_cred_ex_record = (
                    await faber_client.get(
                        f"{CREDENTIALS_BASE_PATH}/{faber_credential_exchange_id}"
                    )
                ).json()
    
                # Save record True, should be 1 record
                assert (
                    faber_cred_ex_record["credential_exchange_id"]
                    == faber_credential_exchange_id
                )
            else:
                # If save_exchange_record was not set, credential should not exist
>               with pytest.raises(HTTPException) as exc:
E               Failed: DID NOT RAISE <class 'fastapi.exceptions.HTTPException'>

app/tests/e2e/issuer/test_save_exchange_record.py:98: Failed

Check failure on line 1 in app/tests/e2e/issuer/test_indy_credentials.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_indy_credentials.test_send_credential[clean-clean-clean-clean-clean]

failed on setup with "app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server."
Raw output
anyio_backend = 'asyncio'
request = <SubRequest 'faber_and_alice_connection' for <Function test_send_credential[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'alice_member_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9e3306e0>, 'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9eb6cf50>, 'test_mode': 'clean'}
local_func = <function faber_and_alice_connection at 0x7effa285d260>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7eff9e34acf0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_connections.py:46: in faber_and_alice_connection
    bob_alice_connection = await create_connection_by_test_mode(
app/tests/util/connections.py:202: in create_connection_by_test_mode
    return await create_did_exchange(
app/tests/util/connections.py:332: in create_did_exchange
    bob_connection = await check_webhook_state(
app/tests/util/webhooks.py:58: in check_webhook_state
    event = await listener.wait_for_event(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.tests.util.sse_listener.SseListener object at 0x7eff9e300440>
field = 'their_did', field_id = 'PJMwFv4HfVjUbwVSajixzu'
desired_state = 'request-received', timeout = Timeout(timeout=30)

    async def wait_for_event(
        self,
        field,
        field_id,
        desired_state,
        timeout: int = DEFAULT_LISTENER_TIMEOUT,
    ) -> Dict[str, Any]:
        """
        Start listening for SSE events. When an event is received that matches the specified parameters.
        """
        url = f"{waypoint_base_url}/{self.wallet_id}/{self.topic}/{field}/{field_id}/{desired_state}?look_back=5"
    
        timeout = Timeout(timeout)
        async with RichAsyncClient(timeout=timeout) as client:
            async with client.stream("GET", url) as response:
                async for line in response.aiter_lines():
                    if line.startswith("data: "):
                        data = json.loads(line[6:])
                        return data["payload"]
                    elif line == "" or line.startswith(": ping"):
                        pass  # ignore newlines and pings
                    else:
                        logger.warning("Unexpected SSE line: {}", line)
    
>       raise SseListenerTimeout("Requested filtered event was not returned by server.")
E       app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server.

app/tests/util/sse_listener.py:56: SseListenerTimeout

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_clear_pending_revokes[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_clear_pending_revokes_no_map[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_publish_all_revocations_for_rev_reg_id[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_publish_all_revocations_no_payload[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_publish_one_revocation[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/test_revocation.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_revocation.test_get_pending_revocations[clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7f0f749bd620>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7f0f74d9c040>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_clear_pending_revokes[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7f0f7491faa0>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:53.26.32', name='test_schema_alt', version='53.26.32', attribute_names=['speed', 'name', 'age'])}
local_func = <function credential_definition_id_revocable at 0x7f0f77b5d300>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7f0f751fb9b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7f0f751ac950>
credential_definition_id = 'XYpqcSPCjWLraNCmLPAv7k:3:CL:3150:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/issuer/test_indy_credentials.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_indy_credentials.test_send_credential_request[clean-clean-clean-clean-clean]

failed on setup with "app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server."
Raw output
anyio_backend = 'asyncio'
request = <SubRequest 'faber_and_alice_connection' for <Function test_send_credential_request[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'alice_member_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9e34cb90>, 'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9eb6cf50>, 'test_mode': 'clean'}
local_func = <function faber_and_alice_connection at 0x7effa285d260>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7eff9e34acf0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_connections.py:46: in faber_and_alice_connection
    bob_alice_connection = await create_connection_by_test_mode(
app/tests/util/connections.py:202: in create_connection_by_test_mode
    return await create_did_exchange(
app/tests/util/connections.py:332: in create_did_exchange
    bob_connection = await check_webhook_state(
app/tests/util/webhooks.py:58: in check_webhook_state
    event = await listener.wait_for_event(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.tests.util.sse_listener.SseListener object at 0x7eff9e3a5a00>
field = 'their_did', field_id = 'GTiHdiGpZ7jwEj3g8FkQkU'
desired_state = 'request-received', timeout = Timeout(timeout=30)

    async def wait_for_event(
        self,
        field,
        field_id,
        desired_state,
        timeout: int = DEFAULT_LISTENER_TIMEOUT,
    ) -> Dict[str, Any]:
        """
        Start listening for SSE events. When an event is received that matches the specified parameters.
        """
        url = f"{waypoint_base_url}/{self.wallet_id}/{self.topic}/{field}/{field_id}/{desired_state}?look_back=5"
    
        timeout = Timeout(timeout)
        async with RichAsyncClient(timeout=timeout) as client:
            async with client.stream("GET", url) as response:
                async for line in response.aiter_lines():
                    if line.startswith("data: "):
                        data = json.loads(line[6:])
                        return data["payload"]
                    elif line == "" or line.startswith(": ping"):
                        pass  # ignore newlines and pings
                    else:
                        logger.warning("Unexpected SSE line: {}", line)
    
>       raise SseListenerTimeout("Requested filtered event was not returned by server.")
E       app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server.

app/tests/util/sse_listener.py:56: SseListenerTimeout

Check failure on line 1 in app/tests/e2e/verifier/test_proof_revoked_credential.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_proof_revoked_credential.test_proof_revoked_credential[clean-clean-clean-clean-clean-clean-auto_publish_true]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7fafc2986880>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7fafc31a77d0>
credential_definition_id = '6hAPTKXs7ngB55Me2qFvo6:3:CL:3195:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7fafc2525640>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_proof_revoked_credential[clean-clean-clean-clean-clean-clean-auto_publish_true]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7fafc21a0b90>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:93.73.78', name='test_schema_alt', version='93.73.78', attribute_names=['age', 'speed', 'name'])}
local_func = <function credential_definition_id_revocable at 0x7fafc6020fe0>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7fafc2d752b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7fafc31a77d0>
credential_definition_id = '6hAPTKXs7ngB55Me2qFvo6:3:CL:3195:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/verifier/test_proof_revoked_credential.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_proof_revoked_credential.test_proof_revoked_credential[clean-clean-clean-clean-clean-clean-default]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7fafc2986880>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7fafc31a77d0>
credential_definition_id = '6hAPTKXs7ngB55Me2qFvo6:3:CL:3195:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7fafc2525640>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_proof_revoked_credential[clean-clean-clean-clean-clean-clean-auto_publish_true]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7fafc21a0b90>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:93.73.78', name='test_schema_alt', version='93.73.78', attribute_names=['age', 'speed', 'name'])}
local_func = <function credential_definition_id_revocable at 0x7fafc6020fe0>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7fafc2d752b0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7fafc31a77d0>
credential_definition_id = '6hAPTKXs7ngB55Me2qFvo6:3:CL:3195:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/verifier/test_get_credentials_by_proof_id.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_get_credentials_by_proof_id.test_limit_and_offset[clean-clean-clean-clean-clean-clean]

failed on setup with "app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation."
Raw output
fut = <coroutine object wait_for_active_registry at 0x7ffba6963d80>
timeout = 120

    async def wait_for(fut, timeout):
        """Wait for the single Future or coroutine to complete, with timeout.
    
        Coroutine will be wrapped in Task.
    
        Returns result of the Future or coroutine.  When a timeout occurs,
        it cancels the task and raises TimeoutError.  To avoid the task
        cancellation, wrap it in shield().
    
        If the wait is cancelled, the task is also cancelled.
    
        If the task suppresses the cancellation and returns a value instead,
        that value is returned.
    
        This function is a coroutine.
        """
        # The special case for timeout <= 0 is for the following case:
        #
        # async def test_waitfor():
        #     func_started = False
        #
        #     async def func():
        #         nonlocal func_started
        #         func_started = True
        #
        #     try:
        #         await asyncio.wait_for(func(), 0)
        #     except asyncio.TimeoutError:
        #         assert not func_started
        #     else:
        #         assert False
        #
        # asyncio.run(test_waitfor())
    
    
        if timeout is not None and timeout <= 0:
            fut = ensure_future(fut)
    
            if fut.done():
                return fut.result()
    
            await _cancel_and_wait(fut)
            try:
                return fut.result()
            except exceptions.CancelledError as exc:
                raise TimeoutError from exc
    
        async with timeouts.timeout(timeout):
>           return await fut

/usr/local/lib/python3.12/asyncio/tasks.py:520: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
app/services/revocation_registry.py:489: in wait_for_active_registry
    await asyncio.sleep(sleep_duration)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

delay = 0.5, result = None

    async def sleep(delay, result=None):
        """Coroutine that completes after a given time (in seconds)."""
        if delay <= 0:
            await __sleep0()
            return result
    
        loop = events.get_running_loop()
        future = loop.create_future()
        h = loop.call_later(delay,
                            futures._set_result_unless_cancelled,
                            future, result)
        try:
>           return await future
E           asyncio.exceptions.CancelledError

/usr/local/lib/python3.12/asyncio/tasks.py:665: CancelledError

The above exception was the direct cause of the following exception:

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7ffba59d17f0>
credential_definition_id = '7ehcVkVAgywuAhnb6uSWR8:3:CL:3271:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
>           await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )

app/services/definitions/credential_definition_publisher.py:65: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/asyncio/tasks.py:519: in wait_for
    async with timeouts.timeout(timeout):
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <Timeout [expired]>
exc_type = <class 'asyncio.exceptions.CancelledError'>
exc_val = CancelledError(), exc_tb = <traceback object at 0x7ffba694d440>

    async def __aexit__(
        self,
        exc_type: Optional[Type[BaseException]],
        exc_val: Optional[BaseException],
        exc_tb: Optional[TracebackType],
    ) -> Optional[bool]:
        assert self._state in (_State.ENTERED, _State.EXPIRING)
    
        if self._timeout_handler is not None:
            self._timeout_handler.cancel()
            self._timeout_handler = None
    
        if self._state is _State.EXPIRING:
            self._state = _State.EXPIRED
    
            if self._task.uncancel() <= self._cancelling and exc_type is exceptions.CancelledError:
                # Since there are no new cancel requests, we're
                # handling this.
>               raise TimeoutError from exc_val
E               TimeoutError

/usr/local/lib/python3.12/asyncio/timeouts.py:115: TimeoutError

The above exception was the direct cause of the following exception:

anyio_backend = 'asyncio'
request = <SubRequest 'credential_definition_id_revocable' for <Function test_limit_and_offset[clean-clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7ffba59f5490>, 'request': <SubRequest 'cre...JJm:2:test_schema_alt:81.57.53', name='test_schema_alt', version='81.57.53', attribute_names=['name', 'age', 'speed'])}
local_func = <function credential_definition_id_revocable at 0x7ffbadb97b00>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7ffba59a37a0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/definitions.py:177: in credential_definition_id_revocable
    result = await get_clean_or_regression_test_cred_def(
app/tests/fixtures/definitions.py:139: in get_clean_or_regression_test_cred_def
    result = await create_credential_definition(
app/routes/definitions.py:255: in create_credential_definition
    credential_definition_id = await cred_def_service.create_credential_definition(
app/services/definitions/credential_definitions.py:65: in create_credential_definition
    await publisher.wait_for_revocation_registry(credential_definition_id)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.services.definitions.credential_definition_publisher.CredentialDefinitionPublisher object at 0x7ffba59d17f0>
credential_definition_id = '7ehcVkVAgywuAhnb6uSWR8:3:CL:3271:tag'

    async def wait_for_revocation_registry(self, credential_definition_id):
        try:
            self._logger.debug("Waiting for revocation registry creation")
            await asyncio.wait_for(
                wait_for_active_registry(self._controller, credential_definition_id),
                timeout=REGISTRY_CREATION_TIMEOUT,
            )
        except asyncio.TimeoutError as e:
            self._logger.error("Timeout waiting for revocation registry creation.")
>           raise CloudApiException(
                "Timeout waiting for revocation registry creation.",
                504,
            ) from e
E           app.exceptions.cloudapi_exception.CloudApiException: 504: Timeout waiting for revocation registry creation.

app/services/definitions/credential_definition_publisher.py:71: CloudApiException

Check failure on line 1 in app/tests/e2e/issuer/test_indy_credentials.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_indy_credentials.test_revoke_credential[clean-clean-clean-clean-clean]

failed on setup with "app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server."
Raw output
anyio_backend = 'asyncio'
request = <SubRequest 'faber_and_alice_connection' for <Function test_revoke_credential[clean-clean-clean-clean-clean]>>
args = ()
kwargs = {'alice_member_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9e302450>, 'faber_client': <shared.util.rich_async_client.RichAsyncClient object at 0x7eff9eb6cf50>, 'test_mode': 'clean'}
local_func = <function faber_and_alice_connection at 0x7effa285d260>
backend_name = 'asyncio', backend_options = {}
runner = <anyio._backends._asyncio.TestRunner object at 0x7eff9e34acf0>

    def wrapper(
        *args: Any, anyio_backend: Any, request: SubRequest, **kwargs: Any
    ) -> Any:
        # Rebind any fixture methods to the request instance
        if (
            request.instance
            and ismethod(func)
            and type(func.__self__) is type(request.instance)
        ):
            local_func = func.__func__.__get__(request.instance)
        else:
            local_func = func
    
        backend_name, backend_options = extract_backend_and_options(anyio_backend)
        if has_backend_arg:
            kwargs["anyio_backend"] = anyio_backend
    
        if has_request_arg:
            kwargs["request"] = request
    
        with get_runner(backend_name, backend_options) as runner:
            if isasyncgenfunction(local_func):
                yield from runner.run_asyncgen_fixture(local_func, kwargs)
            else:
>               yield runner.run_fixture(local_func, kwargs)

/usr/local/lib/python3.12/site-packages/anyio/pytest_plugin.py:100: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2300: in run_fixture
    retval = self.get_loop().run_until_complete(
/usr/local/lib/python3.12/asyncio/base_events.py:686: in run_until_complete
    return future.result()
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2270: in _call_in_runner_task
    return await future
/usr/local/lib/python3.12/site-packages/anyio/_backends/_asyncio.py:2237: in _run_tests_and_fixtures
    retval = await coro
app/tests/fixtures/member_connections.py:46: in faber_and_alice_connection
    bob_alice_connection = await create_connection_by_test_mode(
app/tests/util/connections.py:202: in create_connection_by_test_mode
    return await create_did_exchange(
app/tests/util/connections.py:332: in create_did_exchange
    bob_connection = await check_webhook_state(
app/tests/util/webhooks.py:58: in check_webhook_state
    event = await listener.wait_for_event(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <app.tests.util.sse_listener.SseListener object at 0x7eff9e77b500>
field = 'their_did', field_id = 'U8cLnw1P4FsWcu3S594EcM'
desired_state = 'request-received', timeout = Timeout(timeout=30)

    async def wait_for_event(
        self,
        field,
        field_id,
        desired_state,
        timeout: int = DEFAULT_LISTENER_TIMEOUT,
    ) -> Dict[str, Any]:
        """
        Start listening for SSE events. When an event is received that matches the specified parameters.
        """
        url = f"{waypoint_base_url}/{self.wallet_id}/{self.topic}/{field}/{field_id}/{desired_state}?look_back=5"
    
        timeout = Timeout(timeout)
        async with RichAsyncClient(timeout=timeout) as client:
            async with client.stream("GET", url) as response:
                async for line in response.aiter_lines():
                    if line.startswith("data: "):
                        data = json.loads(line[6:])
                        return data["payload"]
                    elif line == "" or line.startswith(": ping"):
                        pass  # ignore newlines and pings
                    else:
                        logger.warning("Unexpected SSE line: {}", line)
    
>       raise SseListenerTimeout("Requested filtered event was not returned by server.")
E       app.tests.util.sse_listener.SseListenerTimeout: Requested filtered event was not returned by server.

app/tests/util/sse_listener.py:56: SseListenerTimeout