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

createIndex test with showExpandedEvents reports wrong operation on sharded cluster

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 1.15.0
    • Affects Version/s: None
    • Component/s: None
    • None

      Failing on GH actions:

      1) MongoDB\Tests\UnifiedSpecTests\UnifiedSpecTest::testChangeStreams with data set "change-streams/change-streams-showExpandedEvents: when showExpandedEvents is true, createIndex events are reported" (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 &000000002cf7a679000000007c970511 (
      -    'operationType' => 'createIndexes'
      +MongoDB\Model\BSONDocument Object &000000002cf7a644000000007c970511 (
      +    'operationType' => 'create'
      

      Debugging this locally, it looks like the changeStream reports the create operation when the test progresses too fast. Introducing an artificial delay fixes the test.

            Assignee:
            andreas.braun@mongodb.com Andreas Braun
            Reporter:
            andreas.braun@mongodb.com Andreas Braun
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: