Skip to content

Commit 18a5cec

Browse files
committed
Revert "append details to MaxTimeMSExpired responses"
This reverts commit 023c861.
1 parent 023c861 commit 18a5cec

File tree

4 files changed

+2
-10
lines changed

4 files changed

+2
-10
lines changed

pymongo/asynchronous/server.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
_SDAMStatusMessage,
3939
)
4040
from pymongo.message import _convert_exception, _GetMore, _OpMsg, _Query
41-
from pymongo.pool_shared import _get_timeout_details, format_timeout_details
4241
from pymongo.response import PinnedResponse, Response
4342

4443
if TYPE_CHECKING:
@@ -225,10 +224,6 @@ async def run_operation(
225224
if use_cmd:
226225
first = docs[0]
227226
await operation.client._process_response(first, operation.session) # type: ignore[misc, arg-type]
228-
# Append timeout details to MaxTimeMSExpired responses.
229-
if first.get("code") == 50:
230-
timeout_details = _get_timeout_details(conn.opts)
231-
first["errmsg"] += format_timeout_details(timeout_details)
232227
_check_command_response(first, conn.max_wire_version)
233228
except Exception as exc:
234229
duration = datetime.now() - start

pymongo/synchronous/server.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
_SDAMStatusMessage,
3838
)
3939
from pymongo.message import _convert_exception, _GetMore, _OpMsg, _Query
40-
from pymongo.pool_shared import _get_timeout_details, format_timeout_details
4140
from pymongo.response import PinnedResponse, Response
4241
from pymongo.synchronous.helpers import _handle_reauth
4342

@@ -225,10 +224,6 @@ def run_operation(
225224
if use_cmd:
226225
first = docs[0]
227226
operation.client._process_response(first, operation.session) # type: ignore[misc, arg-type]
228-
# Append timeout details to MaxTimeMSExpired responses.
229-
if first.get("code") == 50:
230-
timeout_details = _get_timeout_details(conn.opts)
231-
first["errmsg"] += format_timeout_details(timeout_details)
232227
_check_command_response(first, conn.max_wire_version)
233228
except Exception as exc:
234229
duration = datetime.now() - start

test/asynchronous/test_pooling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ async def find_one():
429429
# maxConnecting = unbounded: 30+ connections in ~0.140+ seconds
430430
print(len(pool.conns))
431431

432+
@flaky(reason="PYTHON-5492")
432433
@async_client_context.require_failCommand_appName
433434
async def test_csot_timeout_message(self):
434435
client = await self.async_rs_or_single_client(appName="connectionTimeoutApp")

test/test_pooling.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,7 @@ def find_one():
429429
# maxConnecting = unbounded: 30+ connections in ~0.140+ seconds
430430
print(len(pool.conns))
431431

432+
@flaky(reason="PYTHON-5492")
432433
@client_context.require_failCommand_appName
433434
def test_csot_timeout_message(self):
434435
client = self.rs_or_single_client(appName="connectionTimeoutApp")

0 commit comments

Comments
 (0)