Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

tests.unit.gapic.eventarc_v1.test_eventarc: test_list_providers_async_pager failed #126

@flaky-bot

Description

@flaky-bot

This test failed!

To configure my behavior, see the Flaky Bot documentation.

If I'm commenting on this issue too often, add the flakybot: quiet label and
I will stop commenting.


commit: ecbea90
buildURL: Build Status, Sponge
status: failed

Test output
@pytest.mark.asyncio
    async def test_list_providers_async_pager():
        client = EventarcAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_providers), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            eventarc.ListProvidersResponse(
                providers=[
                    discovery.Provider(),
                    discovery.Provider(),
                    discovery.Provider(),
                ],
                next_page_token="abc",
            ),
            eventarc.ListProvidersResponse(
                providers=[],
                next_page_token="def",
            ),
            eventarc.ListProvidersResponse(
                providers=[
                    discovery.Provider(),
                ],
                next_page_token="ghi",
            ),
            eventarc.ListProvidersResponse(
                providers=[
                    discovery.Provider(),
                    discovery.Provider(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_providers(
            request={},
        )
        assert async_pager.next_page_token == "abc"
        responses = []
        async for response in async_pager:  # pragma: no branch
            responses.append(response)

        assert len(responses) == 6
      assert all(isinstance(i, discovery.Provider) for i in responses)

E assert False
E + where False = all(<generator object test_list_providers_async_pager.. at 0x7f2ba83f90e0>)

tests/unit/gapic/eventarc_v1/test_eventarc.py:4006: AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: eventarcIssues related to the googleapis/python-eventarc API.flakybot: issueAn issue filed by the Flaky Bot. Should not be added manually.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions