-
Notifications
You must be signed in to change notification settings - Fork 252
Implement search timeout parameter #115
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
Conversation
Wiring looks good. Testing is tricky since we want to avoid performing an actual query but faking it doesn't exactly test it honestly. Will give it some thought. |
Going to sleep on it, but I think I want to test that the timeout integer is written out to the packet. Since it's just a timeout parameter, there's really no timeout to actually test since it's up to the server to respect the value. Longer term, I think it'd be interesting to extract out a |
Conflicts: lib/net/ldap.rb
👍 agree on both observations. |
def test_search_timeout | ||
events = @service.subscribe "search.net_ldap_connection" | ||
|
||
@ldap.search(:time => 5) |
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 will likely fail without a base
specified.
Conflicts: test/integration/test_search.rb
Implement search timeout parameter
Implement search timeout parameter
This is a proposal to implement timeouts for search requests (RFC 4511 4.5.1.5). I decided to name the parameter
time
to be consistent with the existingsize
parameter. I still need to figure out a good approach for testing this, but wanted to open this PR for comments.Fixes #10. Note that this is the protocol timeout, and not a hard socket timeout. That can come in a separate PR.