Skip to content

Commit

Permalink
Fix skipped integration tests if KAFKA_VERSION unset (dpkp#1453)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpkp authored and 88manpreet committed Aug 1, 2018
1 parent 3d631bb commit 6612bfb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/test_producer_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from test.fixtures import ZookeeperFixture, KafkaFixture
from test.testutil import KafkaIntegrationTestCase, kafka_versions, current_offset


# TODO: This duplicates a TestKafkaProducerIntegration method temporarily
# while the migration to pytest is in progress
def assert_produce_request(client, topic, messages, initial_offset, message_ct,
Expand All @@ -34,13 +35,15 @@ def assert_produce_request(client, topic, messages, initial_offset, message_ct,

assert current_offset(client, topic, partition) == initial_offset + message_ct


def assert_produce_response(resp, initial_offset):
"""Verify that a produce response is well-formed
"""
assert len(resp) == 1
assert resp[0].error == 0
assert resp[0].offset == initial_offset


@pytest.mark.skipif(not version(), reason="No KAFKA_VERSION set")
def test_produce_many_simple(simple_client, topic):
"""Test multiple produces using the SimpleClient
Expand Down

0 comments on commit 6612bfb

Please sign in to comment.