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

Function disable_aws_metadata

python/pyarrow/tests/conftest.py:137–143  ·  view source on GitHub ↗

Stop the AWS SDK from trying to contact the EC2 metadata server. Otherwise, this causes a 5 second delay in tests that exercise the S3 filesystem.

(monkeypatch)

Source from the content-addressed store, hash-verified

135
136@pytest.fixture(autouse=True)
137def disable_aws_metadata(monkeypatch):
138 """Stop the AWS SDK from trying to contact the EC2 metadata server.
139
140 Otherwise, this causes a 5 second delay in tests that exercise the
141 S3 filesystem.
142 """
143 monkeypatch.setenv("AWS_EC2_METADATA_DISABLED", "true")
144
145
146# TODO(kszucs): move the following fixtures to test_fs.py once the previous

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected