Apache Iceberg version
None
Please describe the bug 🐞
Moto server is used to mock S3 client calls
MacOS uses port 5000 for AirPlay Receiver which causes port conflict with moto_server used for s3 tests [0][1]
Furthermore, the ThreadedMotoServer implementation kicks off a thread to bind to port 5000. The thread silently errors out when there is a port conflict, but moto server will still assume that port is available.
The tests assume that moto server is available and sends requests. The tests error out with ClientError which is confusing.
poetry run pytest tests/catalog/test_dynamodb.py -k test_create_dynamodb_catalog_with_table_name

Possible solution:
- Manually turn off AirPlay to free up port 5000
- Use another default port (such as 5001)
- Check if the port is available before starting the moto server [2]
- Do (2) and (3)
[0] https://stackoverflow.com/questions/69955686/why-cant-i-run-the-project-on-port-5000
[1] amundsen-io/amundsen#1813
[2] https://stackoverflow.com/questions/2470971/fast-way-to-test-if-a-port-is-in-use-using-python
Apache Iceberg version
None
Please describe the bug 🐞
Moto server is used to mock S3 client calls
MacOS uses port 5000 for AirPlay Receiver which causes port conflict with
moto_serverused for s3 tests [0][1]Furthermore, the
ThreadedMotoServerimplementation kicks off a thread to bind to port 5000. The thread silently errors out when there is a port conflict, but moto server will still assume that port is available.The tests assume that moto server is available and sends requests. The tests error out with ClientError which is confusing.
poetry run pytest tests/catalog/test_dynamodb.py -k test_create_dynamodb_catalog_with_table_namePossible solution:
[0] https://stackoverflow.com/questions/69955686/why-cant-i-run-the-project-on-port-5000
[1] amundsen-io/amundsen#1813
[2] https://stackoverflow.com/questions/2470971/fast-way-to-test-if-a-port-is-in-use-using-python