-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: Tests
-
None
The unified test runner currently injects a unique connection string option into each client it creates in order to ensure libmongoc clients are not re-used (see: MongoDB\Tests\UnifiedSpecTests\Context::createClient()). This is needed for txnNumber assertions, since spec tests expect those to start from 1 (not the case if a persistent client is re-used). There is a TODO item to remove that in favor of the disableClientPersistence option from PHPC-1645. Doing so would likely conserve memory usage since clients would not accumulate throughout the test suite.
A similar change can also be made in the legacy transaction spec test runner, which added a random "p" URI option (see: MongoDB\Tests\SpecTests\fromTransactions()).
- depends on
-
PHPC-1645 Allow disabling of libmongoc client persistence
- Closed