Switch order of test_Connection_checkout_fails_due_to_error_establish… (#1523)

This commit is contained in:
Noah Stapp 2024-02-14 16:44:48 -08:00 committed by GitHub
parent 4191ca81ff
commit 5a867405e6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 20 additions and 19 deletions

View File

@ -75,8 +75,8 @@ _VERBOSE_CONNECTION_ERROR_REASONS = {
ConnectionClosedReason.POOL_CLOSED: "Connection pool was closed",
ConnectionCheckOutFailedReason.POOL_CLOSED: "Connection pool was closed",
ConnectionClosedReason.STALE: "Connection pool was stale",
ConnectionClosedReason.ERROR: "Connection experienced an error",
ConnectionCheckOutFailedReason.CONN_ERROR: "Connection experienced an error",
ConnectionClosedReason.ERROR: "An error occurred while using the connection",
ConnectionCheckOutFailedReason.CONN_ERROR: "An error occurred while trying to establish a new connection",
ConnectionClosedReason.IDLE: "Connection was idle too long",
ConnectionCheckOutFailedReason.TIMEOUT: "Connection exceeded the specified timeout",
}

View File

@ -1132,6 +1132,7 @@ class Connection:
serverPort=self.address[1],
driverConnectionId=self.id,
reason=_verbose_connection_error_reason(reason),
error=reason,
)
def _close_conn(self) -> None:
@ -1981,7 +1982,7 @@ class Pool:
serverHost=self.address[0],
serverPort=self.address[1],
driverConnectionId=conn.id,
reason="An error occurred while using the connection",
reason=_verbose_connection_error_reason(ConnectionClosedReason.ERROR),
error=ConnectionClosedReason.ERROR,
)
else:

View File

@ -425,22 +425,6 @@
}
}
},
{
"level": "debug",
"component": "connection",
"data": {
"message": "Connection pool cleared",
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
}
}
},
{
"level": "debug",
"component": "connection",
@ -486,6 +470,22 @@
"$$exists": true
}
}
},
{
"level": "debug",
"component": "connection",
"data": {
"message": "Connection pool cleared",
"serverHost": {
"$$type": "string"
},
"serverPort": {
"$$type": [
"int",
"long"
]
}
}
}
]
}