simplemonitor icon indicating copy to clipboard operation
simplemonitor copied to clipboard

Add timeout option to tests

Open jamesoff opened this issue 9 years ago • 5 comments

See #33. Add an option to make a test fail if it's taking too long.

jamesoff avatar Jul 30 '16 12:07 jamesoff

Note self: https://pypi.python.org/pypi/subprocess32/

jamesoff avatar Jul 31 '16 12:07 jamesoff

Thanks for your work on this James. Is this where I might want to manually adjust the timeout for now if I am currently only concerned with http?

https://github.com/jamesoff/simplemonitor/blob/master/Monitors/network.py

    def run_test(self):
        # store the current default timeout (since it's global)
        original_timeout = socket.getdefaulttimeout()
        socket.setdefaulttimeout(5)

jtrip avatar Sep 23 '16 13:09 jtrip

Yup, that's the one.

jamesoff avatar Sep 23 '16 13:09 jamesoff

#56 may be of use here as it looks like job execution can be given a timeout.

jamesoff avatar Aug 20 '17 20:08 jamesoff

Should be able to handle this now that monitor evaluation is multithreaded, but I don't see a straightforward way to specify different timeouts for different monitors with it. Bumping for 1.12 while I think about it.

jamesoff avatar Apr 25 '21 11:04 jamesoff