googleapis/python-datacatalog

tests.unit.gapic.datacatalog_v1beta1.test_policy_tag_manager: test_list_taxonomies_pager failed

flaky-bot opened this issue · 1 comments

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: a005321
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_taxonomies_pager(transport_name: str = "grpc"):
    client = PolicyTagManagerClient(
        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_taxonomies), "__call__") as call:
        # Set the response to a series of pages.
        call.side_effect = (
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="abc",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[],
                next_page_token="def",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                ],
                next_page_token="ghi",
            ),
            policytagmanager.ListTaxonomiesResponse(
                taxonomies=[
                    policytagmanager.Taxonomy(),
                    policytagmanager.Taxonomy(),
                ],
            ),
            RuntimeError,
        )

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

        assert pager._metadata == metadata

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

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

tests/unit/gapic/datacatalog_v1beta1/test_policy_tag_manager.py:1679: AssertionError

Closing as a duplicate of #375