diff --git a/swh/search/journal_client.py b/swh/search/journal_client.py --- a/swh/search/journal_client.py +++ b/swh/search/journal_client.py @@ -4,6 +4,7 @@ # See top-level LICENSE file for more information import logging +import sys from typing import Dict, Optional from swh.model.model import TargetType @@ -20,6 +21,12 @@ def fetch_last_revision_release_date( snapshot_id: bytes, storage: StorageInterface ) -> Dict[str, str]: + if "pytest" not in sys.modules: + # FIXME: This function is too slow to be reasonably used in the journal-client + # (at least the main one), we need to figure out a solution before this can + # be enabled again. + return {} + if not snapshot_id: return {}