Mercurial > hg > orthanc-tests
diff Tests/Tests.py @ 496:f78f7ee6b660
fix httpclient
author | Alain Mazy <am@osimis.io> |
---|---|
date | Wed, 17 Aug 2022 13:36:14 +0200 |
parents | 10a47656e34f |
children | c8f9a2dd486d |
line wrap: on
line diff
--- a/Tests/Tests.py Wed Aug 17 09:37:47 2022 +0200 +++ b/Tests/Tests.py Wed Aug 17 13:36:14 2022 +0200 @@ -3908,13 +3908,15 @@ def test_httpClient_lua(self): - retries = 3 + retries = 4 result = '' with open(GetDatabasePath('Lua/HttpClient.lua'), 'r') as f: + scriptContent = f.read() # retry since this test sometimes fails if httpbin.org is unresponsive while retries > 0 and not ('OK' in result): - result = DoPost(_REMOTE, '/tools/execute-script', f.read(), 'application/lua') + print("Executing lua script HttpClient.lua") + result = DoPost(_REMOTE, '/tools/execute-script', scriptContent, 'application/lua') retries -= 1 self.assertIn('OK', result)