-
Type: Task
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Since the PHP driver does not implement CMAP, the Connections Survive Primary Step Down Tests execute serverStatus to track connection counts. If any additional connections happen to be created, this could lead to assertion failures (see: task failure:
[2022/02/25 01:33:23.235] There was 1 failure: [2022/02/25 01:33:23.235] 1) MongoDB\Tests\SpecTests\PrimaryStepDownSpecTest::testInterruptedAtShutdownResetConnectionPool [2022/02/25 01:33:23.235] Failed asserting that 195 is identical to 193. [2022/02/25 01:33:23.235] /data/mci/a59d2ada9e89f9a1b7d4ff1769da9880/src/tests/SpecTests/PrimaryStepDownSpecTest.php:182
The "Reset Connection Pool" tests are only asserting that the driver is creating a new connection, so there should be no reason we can't make these assertions more flexible and expect serverStatus to report one or more connections instead of exactly one more.