Skip to content

Commit f80e673

Browse files
committed
Address Copilot review comments
- query-ctor-maxAwaitTimeMS-001: remove UINT32_MAX case (4294967295 overflows PHP_INT_MAX on 32-bit platforms, causing float coercion) - session-getServer-001: update comment to accurately reflect that mongos pinning was removed in MongoDB 6.0+
1 parent efbebe7 commit f80e673

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

tests/query/query-ctor-maxAwaitTimeMS-001.phpt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,10 @@ echo "maxAwaitTimeMS=0: OK\n";
99
$q = new MongoDB\Driver\Query([], ['maxAwaitTimeMS' => 1000]);
1010
echo "maxAwaitTimeMS=1000: OK\n";
1111

12-
$q = new MongoDB\Driver\Query([], ['maxAwaitTimeMS' => 4294967295]);
13-
echo "maxAwaitTimeMS=4294967295: OK\n";
14-
1512
?>
1613
===DONE===
1714
<?php exit(0); ?>
1815
--EXPECT--
1916
maxAwaitTimeMS=0: OK
2017
maxAwaitTimeMS=1000: OK
21-
maxAwaitTimeMS=4294967295: OK
2218
===DONE===

tests/session/session-getServer-001.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ require_once __DIR__ . "/../utils/basic.inc";
1111
$manager = create_test_manager();
1212
$session = $manager->startSession();
1313

14-
/* Session is not pinned to a server until a transaction operation is executed
15-
* on a sharded cluster. Returns null when the session is not pinned. */
14+
/* Session::getServer() returns null, as sessions are not pinned to a server.
15+
* Note: mongos pinning for sharded transactions was removed in MongoDB 6.0. */
1616
var_dump($session->getServer());
1717

1818
?>

0 commit comments

Comments
 (0)