diff options
author | reAsOn2010 <the.reason.sake@gmail.com> | 2015-06-09 04:20:16 +0800 |
---|---|---|
committer | reAsOn2010 <the.reason.sake@gmail.com> | 2015-06-09 04:20:16 +0800 |
commit | 945fc048a8cc61e1a9390bd7a7fed371d2e23277 (patch) | |
tree | 4d5f584f1d33f89aaa119ad20418b5a91c5ecc55 /test/test_failover_integration.py | |
parent | b1aad92a2e7dfded5f57ebc497dccc5ad3c56781 (diff) | |
download | kafka-python-945fc048a8cc61e1a9390bd7a7fed371d2e23277.tar.gz |
try to fix uncaught FailedPayloadsError
Diffstat (limited to 'test/test_failover_integration.py')
-rw-r--r-- | test/test_failover_integration.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_failover_integration.py b/test/test_failover_integration.py index f260093..1d835e2 100644 --- a/test/test_failover_integration.py +++ b/test/test_failover_integration.py @@ -169,6 +169,14 @@ class TestFailover(KafkaIntegrationTestCase): msg = random_string(10).encode('utf-8') producer.send_messages(topic, key, msg) + @kafka_versions("all") + def test_switch_leader_simple_consumer(self): + producer = Producer(self.client, async=False) + consumer = SimpleConsumer(self.client, None, self.topic, partitions=None, auto_commit=False, iter_timeout=10) + self._send_random_messages(producer, self.topic, 0, 2) + consumer.get_messages() + self._kill_leader(self.topic, 0) + consumer.get_messages() def _send_random_messages(self, producer, topic, partition, n): for j in range(n): |