googleapis/python-datacatalog

tests.unit.gapic.datacatalog_v1.test_policy_tag_manager: test_list_policy_tags_async_pager failed

flaky-bot opened this issue · 0 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
@pytest.mark.asyncio
    async def test_list_policy_tags_async_pager():
        client = PolicyTagManagerAsyncClient(
            credentials=ga_credentials.AnonymousCredentials,
        )
    # Mock the actual call within the gRPC stub, and fake the request.
    with mock.patch.object(
        type(client.transport.list_policy_tags), "__call__", new_callable=mock.AsyncMock
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            policytagmanager.ListPolicyTagsResponse(
                policy_tags=[
                    policytagmanager.PolicyTag(),
                    policytagmanager.PolicyTag(),
                    policytagmanager.PolicyTag(),
                ],
                next_page_token="abc",
            ),
            policytagmanager.ListPolicyTagsResponse(
                policy_tags=[],
                next_page_token="def",
            ),
            policytagmanager.ListPolicyTagsResponse(
                policy_tags=[
                    policytagmanager.PolicyTag(),
                ],
                next_page_token="ghi",
            ),
            policytagmanager.ListPolicyTagsResponse(
                policy_tags=[
                    policytagmanager.PolicyTag(),
                    policytagmanager.PolicyTag(),
                ],
            ),
            RuntimeError,
        )
        async_pager = await client.list_policy_tags(
            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, policytagmanager.PolicyTag) for i in responses)

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

tests/unit/gapic/datacatalog_v1/test_policy_tag_manager.py:3226: AssertionError