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

Test failure - test_threads.TestThreadsAuth.test_auto_auth_login

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

      Failed on https://evergreen.mongodb.com/task/mongo_python_driver_tests_nossl__os_nossl~archlinux_test_auth~auth_ssl~nossl_test_latest_sharded_cluster_a913d343805e3cdb6fce6f04afb889b82fa2df4a_18_12_14_22_52_18 with mongodb version:

       [2018/12/20 12:08:28.625] db version v4.1.6-258-g2c3845a007
       [2018/12/20 12:08:28.625] git version: 2c3845a00763f8e6b2ccae76ba4ea7c1434450df
       [2018/12/20 12:08:28.625] allocator: tcmalloc
       [2018/12/20 12:08:28.625] modules: none
       [2018/12/20 12:08:28.625] build environment:
       [2018/12/20 12:08:28.625]     distarch: x86_64
       [2018/12/20 12:08:28.625]     target_arch: x86_64
       [2018/12/20 12:08:28.625] /data/mci/22ddd27c93dd12276e3b50c4a11ce7a6
      

      Failure:

       [2018/12/20 12:11:57.848] test_auto_auth_login (test_threads.TestThreadsAuth) ... Exception in thread Thread-437:
       [2018/12/20 12:11:57.848] Traceback (most recent call last):
       [2018/12/20 12:11:57.848]   File "/usr/lib64/python3.7/threading.py", line 917, in _bootstrap_inner
       [2018/12/20 12:11:57.848]     self.run()
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/test/test_threads.py", line 45, in run
       [2018/12/20 12:11:57.848]     self.coll.insert_one({'num': i})
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/collection.py", line 693, in insert_one
       [2018/12/20 12:11:57.848]     session=session),
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/collection.py", line 607, in _insert
       [2018/12/20 12:11:57.848]     bypass_doc_val, session)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/collection.py", line 595, in _insert_one
       [2018/12/20 12:11:57.848]     acknowledged, _insert_command, session)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/mongo_client.py", line 1268, in _retryable_write
       [2018/12/20 12:11:57.848]     return self._retry_with_session(retryable, func, s, None)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/mongo_client.py", line 1221, in _retry_with_session
       [2018/12/20 12:11:57.848]     return func(session, sock_info, retryable)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/collection.py", line 590, in _insert_command
       [2018/12/20 12:11:57.848]     retryable_write=retryable_write)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/pool.py", line 579, in command
       [2018/12/20 12:11:57.848]     unacknowledged=unacknowledged)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/network.py", line 150, in command
       [2018/12/20 12:11:57.848]     parse_write_concern_error=parse_write_concern_error)
       [2018/12/20 12:11:57.848]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/pymongo/helpers.py", line 155, in _check_command_response
       [2018/12/20 12:11:57.848]     raise OperationFailure(msg % errmsg, code, response)
       [2018/12/20 12:11:57.848] pymongo.errors.OperationFailure: unable to initialize targeter for write op for collection auth_test.test :: caused by :: Database auth_test not found :: caused by :: database auth_test not found
      ...
       [2018/12/20 12:12:01.309] FAIL: test_auto_auth_login (test_threads.TestThreadsAuth)
       [2018/12/20 12:12:01.309] ----------------------------------------------------------------------
       [2018/12/20 12:12:01.309] Traceback (most recent call last):
       [2018/12/20 12:12:01.309]   File "/data/mci/22ddd27c93dd12276e3b50c4a11ce7a6/src/test/test_threads.py", line 229, in test_auto_auth_login
       [2018/12/20 12:12:01.309]     self.assertTrue(t.success)
       [2018/12/20 12:12:01.309] AssertionError: False is not true
      

      The test starts 10 threads which each run this snippet:

              for i in range(10):
                  self.coll.insert_one({'num': i})
                  self.coll.find_one({'num': i})
      
              self.success = True
      

      I think the error "unable to initialize targeter for write op for collection auth_test.test :: caused by :: Database auth_test not found :: caused by :: database auth_test not found" indicates a bug in server version v4.1.6-258-g2c3845a007.

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

              Created:
              Updated:
              Resolved: