googleapis / python-game-servers

Apache License 2.0
11 stars 6 forks source link

tests.unit.gapic.gaming_v1.test_game_server_deployments_service: test_list_game_server_deployments_pager failed #290

Closed flaky-bot[bot] closed 2 years ago

flaky-bot[bot] commented 2 years ago

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

Test output
transport_name = 'grpc'

    def test_list_game_server_deployments_pager(transport_name: str = "grpc"):
        client = GameServerDeploymentsServiceClient(
            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_game_server_deployments), "__call__"
        ) as call:
            # Set the response to a series of pages.
            call.side_effect = (
                game_server_deployments.ListGameServerDeploymentsResponse(
                    game_server_deployments=[
                        game_server_deployments.GameServerDeployment(),
                        game_server_deployments.GameServerDeployment(),
                        game_server_deployments.GameServerDeployment(),
                    ],
                    next_page_token="abc",
                ),
                game_server_deployments.ListGameServerDeploymentsResponse(
                    game_server_deployments=[],
                    next_page_token="def",
                ),
                game_server_deployments.ListGameServerDeploymentsResponse(
                    game_server_deployments=[
                        game_server_deployments.GameServerDeployment(),
                    ],
                    next_page_token="ghi",
                ),
                game_server_deployments.ListGameServerDeploymentsResponse(
                    game_server_deployments=[
                        game_server_deployments.GameServerDeployment(),
                        game_server_deployments.GameServerDeployment(),
                    ],
                ),
                RuntimeError,
            )

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

            assert pager._metadata == metadata

            results = list(pager)
            assert len(results) == 6
>           assert all(
                isinstance(i, game_server_deployments.GameServerDeployment) for i in results
            )
E           assert False
E            +  where False = all(. at 0x7f0644fc85d0>)

tests/unit/gapic/gaming_v1/test_game_server_deployments_service.py:990: AssertionError
flaky-bot[bot] commented 2 years ago

Closing as a duplicate of #285