Skip to content

Intermittent test failure in test_describe_configs_topic_resource_returns_configs #1929

Closed
@jeffwidman

Description

@jeffwidman

Noticed that two test runs failed on one of the travis builds:

topic = 'test_describe_configs_topic_resource_returns_configs_nXpHTvKOpm'
kafka_admin_client = <kafka.admin.client.KafkaAdminClient object at 0x7f47e3367250>
    @pytest.mark.skipif(env_kafka_version() < (0, 11), reason="Describe config features require broker >=0.11")
    def test_describe_configs_topic_resource_returns_configs(topic, kafka_admin_client):
        """Tests that describe config returns configs for topic
        """
        configs = kafka_admin_client.describe_configs([ConfigResource(ConfigResourceType.TOPIC, topic)])
    
        assert len(configs) == 1
        assert configs[0].resources[0][2] == ConfigResourceType.TOPIC
        assert configs[0].resources[0][3] == topic
>       assert len(configs[0].resources[0][4]) > 1
E       assert 0 > 1
E        +  where 0 = len([])
test/test_admin_integration.py:108: AssertionError

I suspect (but have not verified) that this is a race condition where the topic or config resource is in the midst of being created, but simply hasn't completed by the time it's checked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions