googleapis/python-dialogflow-cx

tests.unit.gapic.dialogflowcx_v3.test_environments: test_list_continuous_test_results_pager failed

flaky-bot opened this issue · 4 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: 7756cb0
buildURL: Build Status, Sponge
status: failed

Test output
transport_name = 'grpc'
def test_list_continuous_test_results_pager(transport_name: str = "grpc"):
    client = EnvironmentsClient(
        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_continuous_test_results), "__call__"
    ) as call:
        # Set the response to a series of pages.
        call.side_effect = (
            environment.ListContinuousTestResultsResponse(
                continuous_test_results=[
                    environment.ContinuousTestResult(),
                    environment.ContinuousTestResult(),
                    environment.ContinuousTestResult(),
                ],
                next_page_token="abc",
            ),
            environment.ListContinuousTestResultsResponse(
                continuous_test_results=[],
                next_page_token="def",
            ),
            environment.ListContinuousTestResultsResponse(
                continuous_test_results=[
                    environment.ContinuousTestResult(),
                ],
                next_page_token="ghi",
            ),
            environment.ListContinuousTestResultsResponse(
                continuous_test_results=[
                    environment.ContinuousTestResult(),
                    environment.ContinuousTestResult(),
                ],
            ),
            RuntimeError,
        )

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

        assert pager._metadata == metadata

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

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

tests/unit/gapic/dialogflowcx_v3/test_environments.py:2958: AssertionError

Closing as a duplicate of #357

Closing as a duplicate of #357

Closing as a duplicate of #357

Closing as a duplicate of #357