# HG changeset patch # User Alain Mazy # Date 1790346282 -7200 # Node ID ea4b4ec7eef1d45caef820ff0224b1b6f7f5feff # Parent 9ce3f60410b49156f140bd2fb681168ac06d2ffc added timeout to avoid infinite loop diff -r 9ce3f60410b4 -r ea4b4ec7eef1 Tests/Tests.py --- a/Tests/Tests.py Fri Sep 25 14:31:15 2026 +0200 +++ b/Tests/Tests.py Fri Sep 25 16:24:42 2026 +0200 @@ -6918,13 +6918,15 @@ def test_storage_commitment_store(self): # Storage commitment is available since Orthanc 1.6.0 - def WaitTransaction(uid): - while True: + def WaitTransaction(uid, timeout=5): + retries = 0 + while retries * 0.1 < timeout: s = DoGet(_REMOTE, '/storage-commitment/%s' % uid) if s['Status'] != 'Pending': return s else: - time.sleep(0.01) + time.sleep(0.1) + retries += 1 i = UploadInstance(_REMOTE, 'DummyCT.dcm')['ID'] self.assertEqual(1, len(DoGet(_REMOTE, '/instances')))