Uploaded image for project: 'Motor'
  1. Motor
  2. MOTOR-425

Enable test_custom_types change stream synchro tests

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Tests
    • None

      test_break_resume_token fails in synchro tests:

       [2019/10/14 15:32:21.871] ERROR: test_break_resume_token
      (test.test_custom_types.TestCollectionChangeStreamsWCustomTypes)
       [2019/10/14 15:32:21.871]
      ----------------------------------------------------------------------
       [2019/10/14 15:32:21.871] Traceback (most recent call last):
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/test/test_custom_types.py",
      line 823, in test_break_resume_token
       [2019/10/14 15:32:21.871]     self.insert_and_check(change_stream, docs[0],
      docs[0])
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/test/test_custom_types.py",
      line 748, in insert_and_check
       [2019/10/14 15:32:21.871]     self.input_target.insert_one(insert_doc)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/collection.py",
      line 698, in insert_one
       [2019/10/14 15:32:21.871]     session=session),
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/collection.py",
      line 612, in _insert
       [2019/10/14 15:32:21.871]     bypass_doc_val, session)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/collection.py",
      line 600, in _insert_one
       [2019/10/14 15:32:21.871]     acknowledged, _insert_command, session)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/mongo_client.py",
      line 1492, in _retryable_write
       [2019/10/14 15:32:21.871]     return self._retry_with_session(retryable, func,
      s, None)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/mongo_client.py",
      line 1385, in _retry_with_session
       [2019/10/14 15:32:21.871]     return func(session, sock_info, retryable)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/collection.py",
      line 597, in _insert_command
       [2019/10/14 15:32:21.871]     _check_write_command_response(result)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/helpers.py",
      line 221, in _check_write_command_response
       [2019/10/14 15:32:21.871]     _raise_last_write_error(write_errors)
       [2019/10/14 15:32:21.871]   File
      "/data/mci/9a7a11dc4d903af858089fe316ac8b10/src/.tox/synchro37/tmp/mongo-python-driver/pymongo/helpers.py",
      line 202, in _raise_last_write_error
       [2019/10/14 15:32:21.871]     raise DuplicateKeyError(error.get("errmsg"),
      11000, error)
       [2019/10/14 15:32:21.871] pymongo.errors.DuplicateKeyError: E11000 duplicate
      key error collection: pymongo_test.test index: _id_ dup key: { : 1 }
      

      I think this is a bug in PyMongo's test not motor. This test should be clearing the collection before and after each test to avoid the duplicate key error. For now we should skip this test. Once it is fixed in PyMongo we can un-skip it.

            Assignee:
            Unassigned Unassigned
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: