From 3ca0d371af637c4ebcab52058bdd0c26edecf9f8 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:26:18 -0600 Subject: [PATCH 01/15] return a http.client.HTTPException instead of OSError --- src/uproot/source/http.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/uproot/source/http.py b/src/uproot/source/http.py index 02e42ee95..b433f4efd 100644 --- a/src/uproot/source/http.py +++ b/src/uproot/source/http.py @@ -106,7 +106,7 @@ def get_num_bytes(file_path: str, parsed_url: urllib.parse.ParseResult, timeout) response = connection.getresponse() break else: - raise OSError( + raise http.client.HTTPException( """remote server responded with status {} (redirect) without a 'location' for URL {}""".format( response.status, file_path @@ -119,7 +119,7 @@ def get_num_bytes(file_path: str, parsed_url: urllib.parse.ParseResult, timeout) if response.status != 200: connection.close() - raise OSError( + raise http.client.HTTPException( """HTTP response was {}, rather than 200, in attempt to get file size in file {}""".format( response.status, file_path @@ -132,7 +132,7 @@ def get_num_bytes(file_path: str, parsed_url: urllib.parse.ParseResult, timeout) return int(x) else: connection.close() - raise OSError( + raise http.client.HTTPException( """response headers did not include content-length: {} in file {}""".format( dict(response.getheaders()), file_path @@ -216,7 +216,7 @@ def get(self, connection, start: int, stop: int) -> bytes: ) return self.get(redirect, start, stop) - raise OSError( + raise http.client.HTTPException( """remote server responded with status {} (redirect) without a 'location' for URL {}""".format( response.status, self._file_path @@ -225,7 +225,7 @@ def get(self, connection, start: int, stop: int) -> bytes: if response.status != 206: connection.close() - raise OSError( + raise http.client.HTTPException( """remote server responded with status {}, rather than 206 (range requests) for URL {}""".format( response.status, self._file_path @@ -322,7 +322,7 @@ def task(resource): task(resource) return - raise OSError( + raise http.client.HTTPException( """remote server responded with status {} (redirect) without a 'location' for URL {}""".format( response.status, source.file_path @@ -428,7 +428,7 @@ def handle_multipart( data = response_buffer.read(length) if len(data) != length: - raise OSError( + raise http.client.HTTPException( """wrong chunk length {} (expected {}) for byte range {} " "in HTTP multipart for URL {}""".format( @@ -454,7 +454,7 @@ def handle_multipart( else: range_string = range_string.decode("utf-8", "surrogateescape") expecting = ", ".join(f"{a}-{b - 1}" for a, b in futures) - raise OSError( + raise http.client.HTTPException( """unrecognized byte range in headers of HTTP multipart: {} expecting: {} From 55a7cc3242e7ca829c11a8f9e99112c91b041e82 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:27:48 -0600 Subject: [PATCH 02/15] rerun tests on http.client.HTTPException --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index bbc888ac0..f478d7d16 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -93,4 +93,4 @@ jobs: - name: Run pytest run: | - python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun requests.exceptions.HTTPError + python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun http.client.HTTPException From 6aac866349dcd17c229dd28a8693076e5ea271e7 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:29:57 -0600 Subject: [PATCH 03/15] remove test skip for xrootd --- tests/test_0001_source_class.py | 21 --------------------- tests/test_0006_notify_when_downloaded.py | 9 --------- tests/test_0007_single_chunk_interface.py | 9 --------- tests/test_0302-pickle.py | 3 --- 4 files changed, 42 deletions(-) diff --git a/tests/test_0001_source_class.py b/tests/test_0001_source_class.py index 4c97d95bd..0753992b6 100644 --- a/tests/test_0001_source_class.py +++ b/tests/test_0001_source_class.py @@ -299,9 +299,6 @@ def test_fallback(server, use_threads, num_workers): assert one[:4] == b"root" -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -322,9 +319,6 @@ def test_xrootd(use_threads): assert one[:4] == b"root" -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -352,9 +346,6 @@ def test_xrootd_fail(use_threads): ) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -376,9 +367,6 @@ def test_xrootd_vectorread(use_threads): assert one[:4] == b"root" -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -398,9 +386,6 @@ def test_xrootd_vectorread_max_element_split(use_threads): assert len(one) == max_element_size + 1 -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -444,9 +429,6 @@ def test_xrootd_vectorread_fail(use_threads): ) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) @@ -474,9 +456,6 @@ def test_xrootd_size(use_threads): assert size1 == 3469136394 -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True) diff --git a/tests/test_0006_notify_when_downloaded.py b/tests/test_0006_notify_when_downloaded.py index aea1a96da..b79b80e2f 100644 --- a/tests/test_0006_notify_when_downloaded.py +++ b/tests/test_0006_notify_when_downloaded.py @@ -145,9 +145,6 @@ def test_http_fallback_workers(server): expected.pop((chunk.start, chunk.stop)) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd(): @@ -168,9 +165,6 @@ def test_xrootd(): expected.pop((chunk.start, chunk.stop)) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd_workers(): @@ -191,9 +185,6 @@ def test_xrootd_workers(): expected.pop((chunk.start, chunk.stop)) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd_vectorread(): diff --git a/tests/test_0007_single_chunk_interface.py b/tests/test_0007_single_chunk_interface.py index 5f3223a7a..dd20d134c 100644 --- a/tests/test_0007_single_chunk_interface.py +++ b/tests/test_0007_single_chunk_interface.py @@ -125,9 +125,6 @@ def test_http_multipart_fail(): tobytes(source.chunk(0, 100).raw_data) -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd(): @@ -147,9 +144,6 @@ def test_xrootd(): assert one[:4] == b"root" -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd_worker(): @@ -169,9 +163,6 @@ def test_xrootd_worker(): assert one[:4] == b"root" -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_xrootd_vectorread(): diff --git a/tests/test_0302-pickle.py b/tests/test_0302-pickle.py index b16603538..1177c7088 100644 --- a/tests/test_0302-pickle.py +++ b/tests/test_0302-pickle.py @@ -53,9 +53,6 @@ def test_pickle_roundtrip_http(): ] -@pytest.mark.skip( - reason="RECHECK: Run2012B_DoubleMuParked.root is super-flaky right now" -) @pytest.mark.network @pytest.mark.xrootd def test_pickle_roundtrip_xrootd(): From 16c30f84fde2104ae983a4bfe0ed55049e239918 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:30:31 -0600 Subject: [PATCH 04/15] rename test --- ...0303-empty-jagged-array.py => test_0303_empty_jagged_array.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{test_0303-empty-jagged-array.py => test_0303_empty_jagged_array.py} (100%) diff --git a/tests/test_0303-empty-jagged-array.py b/tests/test_0303_empty_jagged_array.py similarity index 100% rename from tests/test_0303-empty-jagged-array.py rename to tests/test_0303_empty_jagged_array.py From fb5501504cef69e7f06b26cc1c8952a341771a8a Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:31:01 -0600 Subject: [PATCH 05/15] rename test --- tests/{test_0302-pickle.py => test_0302_pickle.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/{test_0302-pickle.py => test_0302_pickle.py} (100%) diff --git a/tests/test_0302-pickle.py b/tests/test_0302_pickle.py similarity index 100% rename from tests/test_0302-pickle.py rename to tests/test_0302_pickle.py From ddd303edc190e98d9c0010b1b2cb31ed44dc73ec Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 16:46:38 -0600 Subject: [PATCH 06/15] do not capitalize variables --- tests/test_0001_source_class.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_0001_source_class.py b/tests/test_0001_source_class.py index 0753992b6..7fd3200b4 100644 --- a/tests/test_0001_source_class.py +++ b/tests/test_0001_source_class.py @@ -393,8 +393,8 @@ def test_xrootd_vectorread_max_element_split_consistency(use_threads): pytest.importorskip("XRootD") filename = "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root" - def get_chunk(Source, **kwargs): - with Source(filename, **kwargs) as source: + def get_chunk(source_cls, **kwargs): + with source_cls(filename, **kwargs) as source: notifications = queue.Queue() max_element_size = 2097136 chunks = source.chunks([(0, max_element_size + 1)], notifications) From a2a598be8505a3cbc9050fa275d78b7e8958a92e Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 18:04:14 -0600 Subject: [PATCH 07/15] correctly load default options --- src/uproot/source/chunk.py | 14 ++++++++++++++ src/uproot/source/fsspec.py | 10 ++++++---- src/uproot/source/xrootd.py | 2 ++ 3 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/uproot/source/chunk.py b/src/uproot/source/chunk.py index 9a268f63a..0394302f7 100644 --- a/src/uproot/source/chunk.py +++ b/src/uproot/source/chunk.py @@ -30,6 +30,9 @@ class Resource: :doc:`uproot.source.futures.ResourceFuture`. """ + def __init__(self): + self._file_path = None + @property def file_path(self) -> str: """ @@ -49,6 +52,14 @@ class Source: the file. """ + def __init__(self): + self._executor = None + self._num_requested_bytes = 0 + self._num_requests = 0 + self._num_bytes = 0 + self._num_requested_chunks = 0 + self._file_path = None + def chunk(self, start: int, stop: int) -> Chunk: """ Args: @@ -139,6 +150,9 @@ def closed(self) -> bool: True if the associated file/connection/thread pool is closed; False otherwise. """ + if self._executor is None: + return True + return self._executor.closed diff --git a/src/uproot/source/fsspec.py b/src/uproot/source/fsspec.py index 2b9ba1d49..2cb874575 100644 --- a/src/uproot/source/fsspec.py +++ b/src/uproot/source/fsspec.py @@ -26,10 +26,12 @@ class FSSpecSource(uproot.source.chunk.Source): def __init__(self, file_path: str, **options): import fsspec.core - default_options = uproot.reading.open.defaults - - exclude_keys = set(default_options.keys()) - storage_options = {k: v for k, v in options.items() if k not in exclude_keys} + options = dict(uproot.reading.open.defaults, **options) + storage_options = { + k: v + for k, v in options.items() + if k not in uproot.reading.open.defaults.keys() + } self._executor = FSSpecLoopExecutor() diff --git a/src/uproot/source/xrootd.py b/src/uproot/source/xrootd.py index 0571b6713..f3c7a03a7 100644 --- a/src/uproot/source/xrootd.py +++ b/src/uproot/source/xrootd.py @@ -266,6 +266,8 @@ class XRootDSource(uproot.source.chunk.Source): ResourceClass = XRootDResource def __init__(self, file_path: str, **options): + options = dict(uproot.reading.open.defaults, **options) + self._timeout = options["timeout"] self._desired_max_num_elements = options["max_num_elements"] self._use_threads = options["use_threads"] From 0c3e6133a953f5aff4a2cf93dd5f5d59e7e21512 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 18:04:40 -0600 Subject: [PATCH 08/15] timeout error --- src/uproot/source/xrootd.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/uproot/source/xrootd.py b/src/uproot/source/xrootd.py index f3c7a03a7..50a7c496b 100644 --- a/src/uproot/source/xrootd.py +++ b/src/uproot/source/xrootd.py @@ -63,7 +63,10 @@ def get_server_config(file): XRootD_client.flags.QueryCode.CONFIG, "readv_iov_max readv_ior_max" ) if status.error: - raise OSError(status.message) + if status.code in (206,): + raise TimeoutError(status.message) + else: + raise OSError(status.message) # Result is something like b'178956968\n2097136\n' readv_iov_max, readv_ior_max = map(int, result.split(b"\n", 1)) @@ -121,12 +124,12 @@ def _xrd_error(self, status): # https://github.com/xrootd/xrootd/blob/250eced4d3787c2ac5be2c8c922134153bbf7f08/src/XrdCl/XrdClStatus.cc#L34-L74 if status.code in (101, 304, 400): raise uproot._util._file_not_found(self._file_path, status.message) - - else: - raise OSError( - f"""XRootD error: {status.message} -in file {self._file_path}""" + elif status.code in (206,): + raise TimeoutError( + f"XRootD error: {status.message} in file {self._file_path}" ) + else: + raise OSError(f"XRootD error: {status.message} in file {self._file_path}") @property def timeout(self) -> float | None: @@ -460,6 +463,8 @@ class MultithreadedXRootDSource(uproot.source.chunk.MultithreadedSource): ResourceClass = XRootDResource def __init__(self, file_path: str, **options): + options = dict(uproot.reading.open.defaults, **options) + self._num_workers = options["num_workers"] self._timeout = options["timeout"] self._use_threads = options["use_threads"] From 8527fe53214ae2e04541130e6a80c12416a67955 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 18:05:10 -0600 Subject: [PATCH 09/15] update test (TODO: review) --- tests/test_0001_source_class.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/test_0001_source_class.py b/tests/test_0001_source_class.py index 7fd3200b4..201fcc7ca 100644 --- a/tests/test_0001_source_class.py +++ b/tests/test_0001_source_class.py @@ -321,14 +321,12 @@ def test_xrootd(use_threads): @pytest.mark.network @pytest.mark.xrootd -@pytest.mark.parametrize("use_threads", [True, False], indirect=True) -def test_xrootd_deadlock(use_threads): +def test_xrootd_deadlock(): pytest.importorskip("XRootD") # Attach this file to the "test_xrootd_deadlock" function, so it leaks pytest.uproot_test_xrootd_deadlock_f = uproot.source.xrootd.XRootDResource( "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root", timeout=20, - use_threads=use_threads, ) From bd9f2e5f55f2f32f8c5f33062d8b72dc1a0e5777 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 18:18:13 -0600 Subject: [PATCH 10/15] add TimeoutError to retry exceptions --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index f478d7d16..994187a33 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -93,4 +93,4 @@ jobs: - name: Run pytest run: | - python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun http.client.HTTPException + python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "http.client.HTTPException|TimeoutError" From 3a7117e02aa5331a04a5d280ff645c0384808ec6 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 18:31:18 -0600 Subject: [PATCH 11/15] correctly initialized num_bytes --- src/uproot/source/chunk.py | 4 ++-- src/uproot/source/xrootd.py | 2 +- tests/test_0001_source_class.py | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/uproot/source/chunk.py b/src/uproot/source/chunk.py index 0394302f7..4d22a94ae 100644 --- a/src/uproot/source/chunk.py +++ b/src/uproot/source/chunk.py @@ -53,12 +53,12 @@ class Source: """ def __init__(self): - self._executor = None self._num_requested_bytes = 0 self._num_requests = 0 - self._num_bytes = 0 self._num_requested_chunks = 0 self._file_path = None + self._num_bytes = None + self._executor = None def chunk(self, start: int, stop: int) -> Chunk: """ diff --git a/src/uproot/source/xrootd.py b/src/uproot/source/xrootd.py index 50a7c496b..3d514e737 100644 --- a/src/uproot/source/xrootd.py +++ b/src/uproot/source/xrootd.py @@ -290,7 +290,7 @@ def _open(self): # futures that wait for chunks that have been split to merge them. if self._use_threads: self._executor = uproot.source.futures.ResourceThreadPoolExecutor( - [trivial_resource() for x in range(self._num_workers)] + [trivial_resource() for _ in range(self._num_workers)] ) else: self._executor = uproot.source.futures.ResourceTrivialExecutor( diff --git a/tests/test_0001_source_class.py b/tests/test_0001_source_class.py index 201fcc7ca..9155db617 100644 --- a/tests/test_0001_source_class.py +++ b/tests/test_0001_source_class.py @@ -441,7 +441,6 @@ def test_xrootd_size(use_threads): ) as source: size1 = source.num_bytes - pytest.importorskip("XRootD") with uproot.source.xrootd.MultithreadedXRootDSource( "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root", timeout=10, From 8a434ae8524cf9e222e8ce7899da829c6da0d9ec Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Wed, 15 Nov 2023 19:16:02 -0600 Subject: [PATCH 12/15] correctly access resource --- src/uproot/source/futures.py | 4 +--- src/uproot/source/xrootd.py | 6 +++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/uproot/source/futures.py b/src/uproot/source/futures.py index dfed35200..20673a293 100644 --- a/src/uproot/source/futures.py +++ b/src/uproot/source/futures.py @@ -453,9 +453,7 @@ def submit(self, future: ResourceFuture) -> ResourceFuture: """ assert isinstance(future, ResourceFuture) if self.closed: - raise OSError( - f"resource is closed for file {self._workers[0].resource.file_path}" - ) + raise OSError(f"resource is closed for file {self._resource.file_path}") future._run(self._resource) return future diff --git a/src/uproot/source/xrootd.py b/src/uproot/source/xrootd.py index 3d514e737..987fada94 100644 --- a/src/uproot/source/xrootd.py +++ b/src/uproot/source/xrootd.py @@ -508,5 +508,9 @@ def timeout(self) -> float | None: @property def num_bytes(self) -> int: if self._num_bytes is None: - self._num_bytes = self._executor.workers[0].resource.num_bytes + if hasattr(self._executor, "workers"): + self._num_bytes = self._executor.workers[0].resource.num_bytes + else: + self._num_bytes = self._executor._resource.num_bytes + return self._num_bytes From 75ce8fe540ac9cabd9841c2732d4a499154b5534 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Thu, 16 Nov 2023 11:09:12 -0600 Subject: [PATCH 13/15] rerun on timeout --- .github/workflows/build-test.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 994187a33..5a0222a08 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -67,9 +67,7 @@ jobs: - name: Run pytest run: | - python -m pytest -vv tests \ - --reruns 3 --reruns-delay 30 \ - --only-rerun requests.exceptions.HTTPError + python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "http.client.HTTPException|TimeoutError" vanilla-build: strategy: From cec7dfb01fdb6dca1bed8fb957aac99a7a66e63b Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Thu, 16 Nov 2023 12:18:05 -0600 Subject: [PATCH 14/15] update retry regex --- .github/workflows/build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 5a0222a08..ef4277174 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -67,7 +67,7 @@ jobs: - name: Run pytest run: | - python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "http.client.HTTPException|TimeoutError" + python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "(?i)http|timeout" vanilla-build: strategy: @@ -91,4 +91,4 @@ jobs: - name: Run pytest run: | - python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "http.client.HTTPException|TimeoutError" + python -m pytest -vv tests --reruns 3 --reruns-delay 30 --only-rerun "(?i)http|timeout" From ede59f059ced64b7baeda229bb7292dff6548508 Mon Sep 17 00:00:00 2001 From: Luis Antonio Obis Aparicio Date: Thu, 16 Nov 2023 12:23:30 -0600 Subject: [PATCH 15/15] remove outdated test --- tests/test_0001_source_class.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/tests/test_0001_source_class.py b/tests/test_0001_source_class.py index 9155db617..2ca6d98a7 100644 --- a/tests/test_0001_source_class.py +++ b/tests/test_0001_source_class.py @@ -319,17 +319,6 @@ def test_xrootd(use_threads): assert one[:4] == b"root" -@pytest.mark.network -@pytest.mark.xrootd -def test_xrootd_deadlock(): - pytest.importorskip("XRootD") - # Attach this file to the "test_xrootd_deadlock" function, so it leaks - pytest.uproot_test_xrootd_deadlock_f = uproot.source.xrootd.XRootDResource( - "root://eospublic.cern.ch//eos/root-eos/cms_opendata_2012_nanoaod/Run2012B_DoubleMuParked.root", - timeout=20, - ) - - @pytest.mark.network @pytest.mark.xrootd @pytest.mark.parametrize("use_threads", [True, False], indirect=True)