-
Type:
Build Failure
-
Resolution: Fixed
-
Priority:
Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
None
-
Python Drivers
-
Not Needed
-
-
None
-
None
-
None
-
None
-
None
-
None
Name of Failure:
test/test_connection_logging.py::TestConnectionLoggingConnectionPoolOptions::test_Options_should_be_included_in_connection_pool_created_message_when_specified
Link to task:
https://github.com/ShaneHarvey/mongo-python-driver/actions/runs/10219973033/job/28279373821
Context of when and why the failure occurred:
Stack trace:
_ TestConnectionLoggingConnectionPoolOptions.test_Options_should_be_included_in_connection_pool_created_message_when_specified _
self = <test.test_connection_logging.TestConnectionLoggingConnectionPoolOptions testMethod=test_Options_should_be_included_in_connection_pool_created_message_when_specified>
def test_case(self):
> self.run_scenario(spec)
test/unified_format.py:1940:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/unified_format.py:1884: in run_scenario
self._run_scenario(spec, uri)
test/unified_format.py:1914: in _run_scenario
self.check_log_messages(spec["operations"], expect_log_messages)
test/unified_format.py:1815: in check_log_messages
formatted_logs = format_logs(cm.records)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
log_list = [<LogRecord: pymongo.connection, 10, /home/runner/work/mongo-python-driver/mongo-python-driver/pymongo/logger.py, 88, ...1786177671, "driverConnectionId": 8, "serverConnectionId": 688, "serverHost": "localhost", "serverPort": 27017}">, ...]
def format_logs(log_list):
client_to_log = defaultdict(list)
for log in log_list:
if log.module == "ocsp_support":
continue
> data = json_util.loads(log.message)
E AttributeError: 'LogRecord' object has no attribute 'message'
test/unified_format.py:1802: AttributeError