Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1254

Test Failure - test_monitoring.TestCommandMonitoring.test_find_and_get_more

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Trivial - P5 Trivial - P5
    • 3.5
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

      The structure of the document returned by the find command changed in MongoDB 3.5+ causing this test to fail. Update this test to be more liberal in what it accepts.

      ======================================================================
      FAIL: test_find_and_get_more (test_monitoring.TestCommandMonitoring)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "/mnt/jenkins/workspace/mongo-python-driver-nightly/extensions/with-extensions/label/linux64/mongodb_configuration/single_server/mongodb_option/noauth/mongodb_server/master-nightly/python_language_version/2.7/test/test_monitoring.py", line 195, in test_find_and_get_more
          self.assertEqual(expected_result, succeeded.reply)
      AssertionError: {'cursor': {'ns': 'pymongo_test.test', 'nextBatch': [{}, {}, {}, {}], 'id': 3955 [truncated]... != {u'cursor': {u'ns': u'pymongo_test.test', u'nextBatch': [{}, {}, {}, {}], u'id': [truncated]...
      - {'cursor': {'id': 3955303531710L,
      + {u'cursor': {u'id': 3955303531710L,
      ?  +           +
      
      -             'nextBatch': [{}, {}, {}, {}],
      +              u'nextBatch': [{}, {}, {}, {}],
      ?             ++
      
      -             'ns': 'pymongo_test.test'},
      +              u'ns': u'pymongo_test.test'},
      ?             ++      +
      
      -  'ok': 1}
      ?         ^
      
      +  u'ok': 1.0,
      ?  +       ^^^
      
      +  u'operationTime': Timestamp(0, 0)}
      

            Assignee:
            bernie@mongodb.com Bernie Hackett
            Reporter:
            bernie@mongodb.com Bernie Hackett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: