diff options
author | Dana Powers <dana.powers@gmail.com> | 2016-04-07 21:30:35 -0700 |
---|---|---|
committer | Dana Powers <dana.powers@gmail.com> | 2016-04-08 09:23:57 -0700 |
commit | af36c6ddd08a4fa4e5f824f4e70cebab96a1fdc9 (patch) | |
tree | 3c8d6f4b37a01b1cc728519f25496d0e8b60bdfa /test | |
parent | 6662d1e6247f809b04a8fc7cb539a5dd02ed9b65 (diff) | |
download | kafka-python-af36c6ddd08a4fa4e5f824f4e70cebab96a1fdc9.tar.gz |
Reduce batch time in producer integration test (speedup test)
Diffstat (limited to 'test')
-rw-r--r-- | test/test_producer_integration.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/test_producer_integration.py b/test/test_producer_integration.py index 176c99e..a304e83 100644 --- a/test/test_producer_integration.py +++ b/test/test_producer_integration.py @@ -398,14 +398,17 @@ class TestKafkaProducerIntegration(KafkaIntegrationTestCase): partition = self.client.get_partition_ids_for_topic(self.topic)[0] start_offset = self.current_offset(self.topic, partition) - producer = KeyedProducer(self.client, partitioner = RoundRobinPartitioner, async=True) + producer = KeyedProducer(self.client, + partitioner=RoundRobinPartitioner, + async=True, + batch_send_every_t=1) resp = producer.send_messages(self.topic, self.key("key1"), self.msg("one")) self.assertEqual(len(resp), 0) # wait for the server to report a new highwatermark while self.current_offset(self.topic, partition) == start_offset: - time.sleep(0.1) + time.sleep(0.1) self.assert_fetch_offset(partition, start_offset, [ self.msg("one") ]) |