-
Notifications
You must be signed in to change notification settings - Fork 313
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update opts.py to allow for 'None' timeout-value in client_options (#…
…1541) Rally sets a default timeout (60s) for every http api call to elasticsearch. For long running queries this timeout introduces some problems, because rally will fail with a client timeout (which is only traceable via the logs). To work around this timeout issues, one must set the timeout to an arbitrary high value to account for any possible timeouts. Rally actually supports the following three options for values set in the --client-options parameter: int, float or boolean. For the timeout value an additional None is required to allow not specifing a timeout at all. This is due to the underlying urllib3 which requires either an int, float or None value as a timeout as shown by the following error message: .../urllib3/util/timeout.py": ValueError: Timeout value connect was None, but it must be an int, float or None. So far only int and float are usable from the commandline because Nonecannot be passed via the --client-options parameter. This pull request fixes this issue by added the needed functionality to the opts.py module. A to_none() function is added which parses the String "None" to the pythonic None and is called in the kv_to_map() function which parses the --client-options parameters.
- Loading branch information
Showing
3 changed files
with
28 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters