MCPcopy Create free account
hub / github.com/apache/arrow / test_concurrent_s3fs_init

Function test_concurrent_s3fs_init

python/pyarrow/tests/test_fs.py:2161–2180  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2159@pytest.mark.threading
2160@pytest.mark.s3
2161def test_concurrent_s3fs_init():
2162 # GH-39897: lazy concurrent initialization of S3 subsystem should not crash
2163 code = """if 1:
2164 import threading
2165 import pytest
2166 from pyarrow.fs import (FileSystem, S3FileSystem,
2167 ensure_s3_initialized, finalize_s3)
2168 threads = []
2169 fn = lambda: FileSystem.from_uri('s3://mf-nwp-models/README.txt')
2170 for i in range(4):
2171 thread = threading.Thread(target = fn)
2172 threads.append(thread)
2173 thread.start()
2174
2175 for thread in threads:
2176 thread.join()
2177
2178 finalize_s3()
2179 """
2180 subprocess.check_call([sys.executable, "-c", code])
2181
2182
2183@pytest.mark.s3

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected