Disable client persistence when creating clients in test runners

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Unknown
    • 1.13.0-beta1, 1.13.0
    • Affects Version/s: None
    • Component/s: Tests
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • 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()).

            Assignee:
            Aleksandr Rudo (Inactive)
            Reporter:
            Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: