Uploaded image for project: 'PHP Driver: Library'
  1. PHP Driver: Library
  2. PHPLIB-761

Disable client persistence when creating clients in test runners

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.13.0-beta1, 1.13.0
    • 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()).

            Assignee:
            aleksandr.rudo@mongodb.com Aleksandr Rudo (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: