Flaky test in UnifiedSpecTest::testSessions

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 2.3.0
    • Affects Version/s: None
    • Component/s: Unified Test Runner
    • None
    • None
    • PHP Drivers
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?
    • None
    • None
    • None
    • None
    • None
    • None

      The following error appears randomly in Github Actions and Evergreen.

      PHPUnit tests (ubuntu-24.04, 8.1, 8.0, sharded_cluster)

       

      Usually resolved by restarting the job. https://github.com/mongodb/mongo-php-library/actions/runs/17099058825/job/48490455375?pr=1760 

      1) MongoDB\Tests\UnifiedSpecTests\UnifiedSpecTest::testSessions with data set "sessions/implicit sessions default causal consistency: afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot" (MongoDB\Tests\UnifiedSpecTests\UnifiedTestCase Object (...))
      Failed asserting that expected value matches actual value.
      $actual count is 0, expected 1
      --- Expected
      +++ Actual
      @@ @@
      -MongoDB\Model\BSONArray Object #118242 (
      -    0 => MongoDB\Model\BSONDocument Object #118297 (
      -        '_id' => 1,
      -        'x' => 'snapshot',
      -    ),
      -)
      +MongoDB\Model\BSONArray Object #118284 ()
      
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/Constraint/Matches.php:112
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/ExpectedResult.php:48
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/Operation.php:164
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/UnifiedTestRunner.php:213
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/UnifiedTestRunner.php:105
      /home/runner/work/mongo-php-library/mongo-php-library/tests/UnifiedSpecTests/UnifiedSpecTest.php:257

      https://spruce.mongodb.com/task/mongo_php_library_2.1_test_debian12_php_8.4_phpc_next_stable_test_mongodb_latest_sharded_noauth_nossl_94527f21e3aec51a609eff3b4c056457937f496a_25_08_20_12_57_07/logs?execution=0

      [2025/08/20 15:10:51.966] 1) MongoDB\Tests\UnifiedSpecTests\UnifiedSpecTest::testSessions with data set "sessions/implicit sessions default causal consistency: afterClusterTime is not sent on retried read in implicit session when readConcern level is snapshot" (MongoDB\Tests\UnifiedSpecTests\UnifiedTestCase Object (...))[2025/08/20 15:10:51.966] Failed asserting that expected value matches actual value.[2025/08/20 15:10:51.966] $actual count is 0, expected 1[2025/08/20 15:10:51.966] --- Expected[2025/08/20 15:10:51.966] +++ Actual[2025/08/20 15:10:51.966] @@ @@[2025/08/20 15:10:51.966] -MongoDB\Model\BSONArray Object #118244 ([2025/08/20 15:10:51.966] -    0 => MongoDB\Model\BSONDocument Object #118298 ([2025/08/20 15:10:51.966] -        '_id' => 1,[2025/08/20 15:10:51.966] -        'x' => 'snapshot',[2025/08/20 15:10:51.966] -    ),[2025/08/20 15:10:51.966] -)[2025/08/20 15:10:51.966] +MongoDB\Model\BSONArray Object #118285 ()[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/Constraint/Matches.php:112[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/ExpectedResult.php:48[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/Operation.php:164[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/UnifiedTestRunner.php:213[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/UnifiedTestRunner.php:105[2025/08/20 15:10:51.966] /data/mci/d464196aa5140b7ea83302250dad9c59/src/tests/UnifiedSpecTests/UnifiedSpecTest.php:257

            Assignee:
            Pauline Vos
            Reporter:
            Jérôme Tamarelle
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: