googleapis/python-spanner

Segmentation Fault while running pytest with coverage

gauravpurohit06 opened this issue · 0 comments

I am using spanner python client to connect with spanner and my code is available and defined here: https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app/blob/main/retrieval_service/datastore/providers/spanner_gsql.py

Test File: https://github.com/GoogleCloudPlatform/genai-databases-retrieval-app/blob/main/retrieval_service/datastore/providers/spanner_gsql_test.py

When I am trying to run integration testwithout coverage it's running successfully and with coverage it's failing with segmentation fault.

Commands:
With Coverage:
python -m pytest --cov=datastore.providers.spanner_gsql --cov-config=coverage/.spanner-coveragerc datastore/providers/spanner_gsql_test.py

Without Coverage:
python -m pytest datastore/providers/spanner_gsql_test.py

Error Log:
`datastore/providers/spanner_gsql_test.py Fatal Python error: Segmentation fault

Current thread 0x00007f064af502c0 (most recent call first):
File "/usr/local/google/home/gauravpurohit/ai/airport/lib/python3.11/site-packages/proto/message.py", line 615 in init
File "/usr/local/google/home/gauravpurohit/ai/airport/lib/python3.11/site-packages/google/cloud/spanner_v1/client.py", line 175 in init
File "/usr/local/google/home/gauravpurohit/ai/genai-databases-retrieval-app/retrieval_service/datastore/providers/spanner_gsql_test.py", line 62 in create_db`