The test added in PYTHON-2596 sometimes fails when TLS is enabled:
[2021/03/13 00:12:28.550] FAIL [0.036s]: test_network_error_message (test_client.TestClient) [2021/03/13 00:12:28.550] ---------------------------------------------------------------------- [2021/03/13 00:12:28.550] Traceback (most recent call last): [2021/03/13 00:12:28.550] File "/data/mci/96d4a3993478a1433dc769d9fa3aeec0/src/pymongo/pool.py", line 708, in receive_message [2021/03/13 00:12:28.550] return receive_message(self, request_id, self.max_message_size) [2021/03/13 00:12:28.550] File "/data/mci/96d4a3993478a1433dc769d9fa3aeec0/src/pymongo/network.py", line 192, in receive_message [2021/03/13 00:12:28.550] _receive_data_on_socket(sock_info, 16, deadline)) [2021/03/13 00:12:28.550] ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2570) [2021/03/13 00:12:28.550] The above exception was the direct cause of the following exception: [2021/03/13 00:12:28.550] pymongo.errors.AutoReconnect: localhost:27017: EOF occurred in violation of protocol (_ssl.c:2570) [2021/03/13 00:12:28.550] During handling of the above exception, another exception occurred: [2021/03/13 00:12:28.550] Traceback (most recent call last): [2021/03/13 00:12:28.550] File "/data/mci/96d4a3993478a1433dc769d9fa3aeec0/src/test/__init__.py", line 496, in wrap [2021/03/13 00:12:28.550] return f(*args, **kwargs) [2021/03/13 00:12:28.550] File "/data/mci/96d4a3993478a1433dc769d9fa3aeec0/src/test/test_client.py", line 1581, in test_network_error_message [2021/03/13 00:12:28.550] client.pymongo_test.test.find_one({}) [2021/03/13 00:12:28.550] AssertionError: "localhost:27017: connection closed" does not match "localhost:27017: EOF occurred in violation of protocol (_ssl.c:2570)"
We need to update the test to be more general because TLS errors like this are expected in this particular test.
- is caused by
-
PYTHON-2596 Connection errors should always include the host in the error message
- Closed