Skip to content
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

[output] catch requests timeout exceptions #627

Merged
merged 1 commit into from
Mar 12, 2018

Conversation

chunyong-lin
Copy link
Contributor

to: @ryandeivert or @javuto
cc: @airbnb/streamalert-maintainers
size: small
resolves N/A

Background

During an internal triage, I found out we need to catch ReadTimeout and ConnectTimeout while sending requests post request. requests.execptions.Timeout will catch both ReadTimeout and ConnectTimeout.

Changes

  • Add requests.exceptions.Timeout to default exceptions in output base class
  • Update unit test cases.

Testing

  • Unit test
./tests/scripts/unit_tests.sh
...
Ran 548 tests in 9.324s

OK
  • Rule test
python manage.py lambda test --processor all
...
StreamAlertCLI [INFO]: (61/61) Successful Tests
StreamAlertCLI [INFO]: (33/33) Alert Tests Passed
StreamAlertCLI [INFO]: Completed

@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 95.757% when pulling d50dba6 on catch_requests_read_timeout into e8151bf on master.

Copy link
Contributor

@ryandeivert ryandeivert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐑 🐑 🚢 🐑 🐑

@jacknagz
Copy link
Contributor

🚢

@ryandeivert ryandeivert merged commit cc20bc2 into master Mar 12, 2018
@ryandeivert ryandeivert deleted the catch_requests_read_timeout branch March 12, 2018 20:03
@ryandeivert ryandeivert added this to the 1.6.1 milestone Mar 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants