Build/Test Explorer

github/python-memcache Target status: Failed

Target ran on for 26 min, 27 sec
4 Flaky311 Passed
1 test warning found.

Tests are flaky across runs, but the invocation is missing the blaze flag --runs_per_test_detects_flakes, so blaze is reporting the target as failed instead of flaky. Blaze flag description

There is test suite information that is not visible in this view.  Switch to Tree View to see test suites.
Status
Test
Start time
Run time
Flakytest_cloud_memcache.test_list_instances_pager
Attempt 1
Attempt
assert False
+ where False = all(<generator object test_list_instances_pager.<locals>.<genexpr> at 0x7f4a2a5765e0>)
transport_name = 'grpc'

def test_list_instances_pager(transport_name: str = "grpc"):
client = CloudMemcacheClient(
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_instances), "__call__") as call:
# Set the response to a series of pages.
call.side_effect = (
cloud_memcache.ListInstancesResponse(
instances=[
cloud_memcache.Instance(),
cloud_memcache.Instance(),
cloud_memcache.Instance(),
],
next_page_token="abc",
),
cloud_memcache.ListInstancesResponse(
instances=[],
next_page_token="def",
),
cloud_memcache.ListInstancesResponse(
instances=[
cloud_memcache.Instance(),
],
next_page_token="ghi",
),
cloud_memcache.ListInstancesResponse(
instances=[
cloud_memcache.Instance(),
cloud_memcache.Instance(),
],
),
RuntimeError,
)

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

assert pager._metadata == metadata

results = list(pager)
assert len(results) == 6
> assert all(isinstance(i, cloud_memcache.Instance) for i in results)
E assert False
E + where False = all(<generator object test_list_instances_pager.<locals>.<genexpr> at 0x7f4a2a5765e0>)

tests/unit/gapic/memcache_v1/test_cloud_memcache.py:941: AssertionError
  assert False
 +  where False = all(<generator object test_list_instances_pager.<locals>.<genexpr> at 0x7f4a2a5765e0>)
transport_name = 'grpc'

    def test_list_instances_pager(transport_name: str = "grpc"):
        client = CloudMemcacheClient(
            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_instances), "__call__") as call:
            # Set the response to a series of pages.
            call.side_effect = (
                cloud_memcache.ListInstancesResponse(
                    instances=[
                        cloud_memcache.Instance(),
                        cloud_memcache.Instance(),
                        cloud_memcache.Instance(),
                    ],
                    next_page_token="abc",
                ),
                cloud_memcache.ListInstancesResponse(
                    instances=[],
                    next_page_token="def",
                ),
                cloud_memcache.ListInstancesResponse(
                    instances=[
                        cloud_memcache.Instance(),
                    ],
                    next_page_token="ghi",
                ),
                cloud_memcache.ListInstancesResponse(
                    instances=[
                        cloud_memcache.Instance(),
                        cloud_memcache.Instance(),
                    ],
                ),
                RuntimeError,
            )
    
            metadata = ()
            metadata = tuple(metadata) + (
                gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
            )
            pager = client.list_instances(request={})
    
            assert pager._metadata == metadata
    
            results = list(pager)
            assert len(results) == 6
>           assert all(isinstance(i, cloud_memcache.Instance) for i in results)
E           assert False
E            +  where False = all(<generator object test_list_instances_pager.<locals>.<genexpr> at 0x7f4a2a5765e0>)

tests/unit/gapic/memcache_v1/test_cloud_memcache.py:941: AssertionError
Items per page:
1 – 4 of 4