-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error if connections_max_idle_ms not larger than request_timeout_ms #1688
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,11 +15,15 @@ | |
class TestKafkaConsumer: | ||
def test_session_timeout_larger_than_request_timeout_raises(self): | ||
with pytest.raises(KafkaConfigurationError): | ||
KafkaConsumer(bootstrap_servers='localhost:9092', api_version=(0,9), group_id='foo', session_timeout_ms=60000, request_timeout_ms=40000) | ||
KafkaConsumer(bootstrap_servers='localhost:9092', api_version=(0, 9), group_id='foo', session_timeout_ms=50000, request_timeout_ms=40000) | ||
|
||
def test_fetch_max_wait_larger_than_request_timeout_raises(self): | ||
with pytest.raises(KafkaConfigurationError): | ||
KafkaConsumer(bootstrap_servers='localhost:9092', fetch_max_wait_ms=41000, request_timeout_ms=40000) | ||
KafkaConsumer(bootstrap_servers='localhost:9092', fetch_max_wait_ms=50000, request_timeout_ms=40000) | ||
|
||
def test_request_timeout_larger_than_connections_max_idle_ms_raises(self): | ||
with pytest.raises(KafkaConfigurationError): | ||
KafkaConsumer(bootstrap_servers='localhost:9092', api_version=(0, 9), request_timeout_ms=50000, connections_max_idle_ms=40000) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not understand why this test fails with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think that may have been a side effect of the old AND check. If you drop the api_version here I would expect the test to still pass There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IIRC, I actually did try that exact thing this morning, and it still failed with the |
||
|
||
def test_subscription_copy(self): | ||
consumer = KafkaConsumer('foo', api_version=(0, 10)) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was a simple change from
41000
to50000
purely for improved readability/consistency with the other tests here, the test passes either way.