newsapps / beeswithmachineguns

A utility for arming (creating) many bees (micro EC2 instances) to attack (load test) targets (web applications).
http://apps.chicagotribune.com/
MIT License
6.43k stars 631 forks source link

Improvement for issue #178 in beeswithmachineguns, no helpful informa… #199

Open FliesLikeABrick opened 6 years ago

FliesLikeABrick commented 6 years ago

Improvement for #178 , no helpful information printed for _sting request failures, and is a fatal error. Modified to be non-fatal, prints error to stderr. This is not ideal, urllib.errors does not seem to exist on python2, was unable to find a way to catch HTTPError or URLERror specifically, so had to go with overly-broad exception catching

cosmin commented 6 years ago

Perhaps look at switching to urllib3 instead? It’s the modern alternative and should make it easier to deal with this.

FliesLikeABrick commented 6 years ago

@cosmin heh, I have been narrowly avoiding that since I wasn't sure about broaching the larger topic of python2 vs 3 support. I am happy to create a patch to change to urllib3 if we are ok with adding another non-stdlib dependency for python2. Thoughts?

cosmin commented 6 years ago

I think that’s fine, better to add that dependency than deal with the urllib cluster

FliesLikeABrick commented 6 years ago

ok, I will see work on this branch further (leaving the PR open) and take a shot at adapting to urllib3