Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions test/integration/test_admin_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ def test_create_describe_delete_acls(kafka_admin_client):
def test_describe_configs_broker_resource_returns_configs(kafka_admin_client):
"""Tests that describe config returns configs for broker
"""
broker_id = kafka_admin_client._client.cluster._brokers[0].node_id
broker_id = kafka_admin_client._client.least_loaded_node()
configs = kafka_admin_client.describe_configs([ConfigResource(ConfigResourceType.BROKER, broker_id)])

assert len(configs) == 1
Expand Down Expand Up @@ -128,7 +128,7 @@ def test_describe_configs_topic_resource_returns_configs(topic, kafka_admin_clie
def test_describe_configs_mixed_resources_returns_configs(topic, kafka_admin_client):
"""Tests that describe config returns configs for mixed resource types (topic + broker)
"""
broker_id = kafka_admin_client._client.cluster._brokers[0].node_id
broker_id = kafka_admin_client._client.least_loaded_node()
configs = kafka_admin_client.describe_configs([
ConfigResource(ConfigResourceType.TOPIC, topic),
ConfigResource(ConfigResourceType.BROKER, broker_id)])
Expand All @@ -153,14 +153,6 @@ def test_describe_configs_invalid_broker_id_raises(kafka_admin_client):
kafka_admin_client.describe_configs([ConfigResource(ConfigResourceType.BROKER, broker_id)])


@pytest.mark.skipif(env_kafka_version() < (0, 11), reason='Describe consumer group requires broker >=0.11')
def test_describe_consumer_group_does_not_exist(kafka_admin_client):
"""Tests that the describe consumer group call fails if the group coordinator is not available
"""
with pytest.raises(CoordinatorNotAvailableError):
kafka_admin_client.describe_consumer_groups(['test'])


@pytest.mark.skipif(env_kafka_version() < (0, 11), reason='Describe consumer group requires broker >=0.11')
def test_describe_consumer_group_exists(kafka_admin_client, kafka_consumer_factory, topic):
"""Tests that the describe consumer group call returns valid consumer group information
Expand Down
2 changes: 2 additions & 0 deletions test/integration/test_sasl_integration.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import logging
import os
import uuid
import time

Expand All @@ -10,6 +11,7 @@
from test.testutil import assert_message_count, env_kafka_version, random_string, special_to_underscore
from test.integration.fixtures import client_params, create_topics

pytestmark = pytest.mark.skipif("KAFKA_URI" in os.environ, reason="Testing on external Kafka Broker")

@pytest.fixture(
params=[
Expand Down
2 changes: 1 addition & 1 deletion test/test_fetcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,7 @@ def test_success_does_not_check_exception(self, client, mocker):
def poll_side_effect(**kw):
f = kw.get('future')
if f is future1:
# Succeeds but has retry partitions the bug was that code
# Succeeds but has retry partitions -- the bug was that code
# would fall through to check future.exception (which is None),
# causing an AttributeError
f.success(({tp0: offset0}, {tp1}))
Expand Down
Loading