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

tests.unit.gapic.monitoring_v3.test_group_service: test_list_groups_pager failed #358

Closed
@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: 78cbcf5
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_groups_pager(transport_name: str = "grpc"):
    client = GroupServiceClient(
        credentials=ga_credentials.AnonymousCredentials,
        transport=transport_name,
    )

    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(type(client.transport.list_groups), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            group_service.ListGroupsResponse(
                group=[
                    group.Group(),
                    group.Group(),
                    group.Group(),
                ],
                next_page_token="abc",
            ),
            group_service.ListGroupsResponse(
                group=[],
                next_page_token="def",
            ),
            group_service.ListGroupsResponse(
                group=[
                    group.Group(),
                ],
                next_page_token="ghi",
            ),
            group_service.ListGroupsResponse(
                group=[
                    group.Group(),
                    group.Group(),
                ],
            ),
            RuntimeError,
        )

        metadata = ()
        metadata = tuple(metadata) + (
            gapic_v1.routing_header.to_grpc_metadata((("name", ""),)),
        )
        pager = client.list_groups(request={})

        assert pager._metadata == metadata

        results = list(pager)
        assert len(results) == 6
      assert all(isinstance(i, group.Group) for i in results)

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

tests/unit/gapic/monitoring_v3/test_group_service.py:923: AssertionError

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: monitoringIssues related to the googleapis/python-monitoring 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