summaryrefslogtreecommitdiff
path: root/test/test_consumer.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_consumer.py')
-rw-r--r--test/test_consumer.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_consumer.py b/test/test_consumer.py
index f3dad16..073a3af 100644
--- a/test/test_consumer.py
+++ b/test/test_consumer.py
@@ -16,6 +16,14 @@ class TestKafkaConsumer(unittest.TestCase):
with self.assertRaises(AssertionError):
SimpleConsumer(MagicMock(), 'group', 'topic', partitions = [ '0' ])
+ def test_session_timeout_larger_than_request_timeout_raises(self):
+ with self.assertRaises(KafkaConfigurationError):
+ KafkaConsumer(bootstrap_servers='localhost:9092', session_timeout_ms=60000, request_timeout_ms=40000)
+
+ def test_fetch_max_wait_larger_than_request_timeout_raises(self):
+ with self.assertRaises(KafkaConfigurationError):
+ KafkaConsumer(bootstrap_servers='localhost:9092', fetch_max_wait_ms=41000, request_timeout_ms=40000)
+
class TestMultiProcessConsumer(unittest.TestCase):
@unittest.skipIf(sys.platform.startswith('win'), 'test mocking fails on windows')