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

Drop operation from initialData unexpectedly returned in change stream spec tests

    • Type: Icon: Build Failure Build Failure
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      The following error(s) started appearing on sharded clusters after 20e8f91 was merged (unified change stream spec tests):

      FAILURE:  (PHPUnit\Framework\ExpectationFailedException)
       MongoDB\Tests\UnifiedSpecTests\UnifiedSpecTest::testChangeStreams with data set "change-streams/change-streams: to field is set in a rename change event" (MongoDB\Tests\UnifiedSpecTests\UnifiedTestCase Object (...))
      Failed asserting that expected value matches actual value.
      Field path "operationType": Failed asserting that two strings are equal.
      --- Expected
      +++ Actual
      @@ @@
      -MongoDB\Model\BSONDocument Object &000000005fcd7944000000002073c9cd (
      -    'operationType' => 'rename'
      -    'ns' => MongoDB\Model\BSONDocument Object &000000005fcd7833000000002073c9cd (
      +MongoDB\Model\BSONDocument Object &000000005fcd7861000000002073c9cd (
      +    '_id' => MongoDB\Model\BSONDocument Object &000000005fcd7923000000002073c9cd (
      +        '_data' => '82625890350000000A2B022C0100296E5A10042F5D2A5CBE2847B18EF178A5059F6FDF04'
      +    )
      +    'operationType' => 'drop'
      +    'clusterTime' => MongoDB\BSON\Timestamp Object &000000005fcd795f000000002073c9cd (
      +        'increment' => '10'
      +        'timestamp' => '1649971253'
      +    )
      +    'ns' => MongoDB\Model\BSONDocument Object &000000005fcd782d000000002073c9cd (
               'db' => 'database0'
               'coll' => 'collection0'
      -    )
      -    'to' => MongoDB\Model\BSONDocument Object &000000005fcd799b000000002073c9cd (
      -        'db' => 'database0'
      -        'coll' => 'collection1'
           )
       )
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/Constraint/Matches.php:113
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/PHPUnit/Functions.php:2185
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/ExpectedResult.php:53
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/Operation.php:160
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/UnifiedTestRunner.php:205
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/UnifiedTestRunner.php:94
      /data/mci/5d950b7109146bf7b3552c8f191c3c3c/src/tests/UnifiedSpecTests/UnifiedSpecTest.php:136
      

      Quoting this comment from mongodb/mongo-php-library#908:

      The unexpected drop is most certainly coming from initialData in the spec test file, which clears the one collection under test, but I've never seen this before. The errors are also intermittent, and can disappear when restarting the builds.

            Assignee:
            jmikola@mongodb.com Jeremy Mikola
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: