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

Disable client persistence when creating clients in test runners

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed
    • Unknown
    • Resolution: Fixed
    • None
    • 1.13.0-beta1, 1.13.0
    • Tests
    • None

    Description

      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()).

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: