# HG changeset patch # User Alain Mazy # Date 1780992473 -7200 # Node ID 9272f0f93ea5415ec785f8c30b1f32ef65114a82 # Parent f8511b19e114571400e91fced7977a9bccd43a85 adapt tests for the streaming branch diff -r f8511b19e114 -r 9272f0f93ea5 NewTests/ExtraMainDicomTags/test_extra_main_dicom_tags.py --- a/NewTests/ExtraMainDicomTags/test_extra_main_dicom_tags.py Wed Jun 03 16:04:30 2026 +0200 +++ b/NewTests/ExtraMainDicomTags/test_extra_main_dicom_tags.py Tue Jun 09 10:07:53 2026 +0200 @@ -101,18 +101,12 @@ self.assertIn("PerformedProtocolCodeSequence", instance["MainDicomTags"]) def get_storage_access_count(self): - mm = self.o.get_binary("/tools/metrics-prometheus").decode("utf-8") + m = self.o.get_metrics() - mm = [x.split(" ") for x in mm.split("\n")] + count = int(m.get('orthanc_storage_cache_hit_count')) + int(m.get('orthanc_storage_cache_miss_count')) - count = 0 - for m in mm: - if m[0] == 'orthanc_storage_cache_hit_count': - # print(f"orthanc_storage_cache_hit_count = {m[1]}") - count += int(m[1]) - if m[0] == 'orthanc_storage_cache_miss_count': - # print(f"orthanc_storage_cache_miss_count = {m[1]}") - count += int(m[1]) + if self.o.get_system()["ApiVersion"] >= 32: # 1.12.11+ and 32 = streaming branch + count += int(m.get('orthanc_dicom_cache_hit_count')) print(f"storage access count = {count}") return count diff -r f8511b19e114 -r 9272f0f93ea5 NewTests/InterruptedDownloads/test_interrupted_downloads.py --- a/NewTests/InterruptedDownloads/test_interrupted_downloads.py Wed Jun 03 16:04:30 2026 +0200 +++ b/NewTests/InterruptedDownloads/test_interrupted_downloads.py Tue Jun 09 10:07:53 2026 +0200 @@ -81,7 +81,7 @@ def test_interrupting_a_download_should_cancel_the_archive_job(self): # note: there was a regression between 1.12.10 and 1.12.11 - if self.o.is_orthanc_version_at_least(1, 12, 12): + if self.o.is_orthanc_version_at_least(1, 12, 12) and self.o.get_system()["ApiVersion"] >= 32: # 1.12.11+ and 32 = streaming branch self.o.delete_all_content() populator = OrthancTestDbPopulator(self.o, studies_count=1, series_count=2, instances_count=200, random_seed=65) populator.execute()