diff options
author | Martin Cairns <4314538+MartinCairnsSQL@users.noreply.github.com> | 2022-10-30 17:03:25 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-30 17:03:25 +0000 |
commit | 6c9e427c0eb6e48e367ea5c63c49ed8ac837b85e (patch) | |
tree | 7fb5368a73ab11a6b509d801842790d8cb1521d6 /test/server_poll.py | |
parent | 34c86c12b0a9d650d4e7c5be478bca34ad8ed048 (diff) | |
parent | 17a2076f72562b428052ee3fc8c43d19c03ecd1e (diff) | |
download | stable-diffusion-webui-gfx803-6c9e427c0eb6e48e367ea5c63c49ed8ac837b85e.tar.gz stable-diffusion-webui-gfx803-6c9e427c0eb6e48e367ea5c63c49ed8ac837b85e.tar.bz2 stable-diffusion-webui-gfx803-6c9e427c0eb6e48e367ea5c63c49ed8ac837b85e.zip |
Merge branch 'AUTOMATIC1111:master' into adjust-ddim-uniform-steps
Diffstat (limited to 'test/server_poll.py')
-rw-r--r-- | test/server_poll.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/server_poll.py b/test/server_poll.py new file mode 100644 index 00000000..eeefb7eb --- /dev/null +++ b/test/server_poll.py @@ -0,0 +1,19 @@ +import unittest +import requests +import time + + +def run_tests(): + timeout_threshold = 240 + start_time = time.time() + while time.time()-start_time < timeout_threshold: + try: + requests.head("http://localhost:7860/") + break + except requests.exceptions.ConnectionError: + pass + if time.time()-start_time < timeout_threshold: + suite = unittest.TestLoader().discover('', pattern='*_test.py') + result = unittest.TextTestRunner(verbosity=2).run(suite) + else: + print("Launch unsuccessful") |