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

Reset the server pool only after marking the server Unknown

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.11
    • Affects Version/s: 3.11
    • Component/s: Tests
    • None

      This test fails infrequently after PYTHON-2199:

       [2020/05/08 03:59:42.871] FAIL [0.008s]: test_network_error_on_delete (test_client.TestMongoClientFailover)
       [2020/05/08 03:59:42.871] ----------------------------------------------------------------------
       [2020/05/08 03:59:42.871] Traceback (most recent call last):
       [2020/05/08 03:59:42.871]   File "/data/mci/25291165abb0d1998479e9fde6d10c27/src/test/test_client.py", line 1838, in test_network_error_on_delete
       [2020/05/08 03:59:42.871]     self._test_network_error(callback)
       [2020/05/08 03:59:42.871]   File "/data/mci/25291165abb0d1998479e9fde6d10c27/src/test/test_client.py", line 1808, in _test_network_error
       [2020/05/08 03:59:42.871]     self.assertEqual(SERVER_TYPE.Unknown, sd_a.server_type)
       [2020/05/08 03:59:42.871] AssertionError: 0 != 2
       

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_rhel62_test_ssl__platform~rhel62_auth~auth_ssl~ssl_python_version~2.7_coverage~coverage_test_3.2_standalone_patch_6e39ae04c3317dba47cc94083588830a9ff6435a_5eb4d78b32f417129b2f019d_20_05_08_03_52_57

      Another related test failure which I think is caused by the same issue:

      [2020/06/02 01:00:04.954] ERROR [0.122s]: test_reconnect (test_client.TestMongoClientFailover)
      [2020/06/02 01:00:04.954] ----------------------------------------------------------------------
      [2020/06/02 01:00:04.954] Traceback (most recent call last):
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/test/test_client.py", line 1782, in test_reconnect
      [2020/06/02 01:00:04.954]     self.assertRaises(ServerSelectionTimeoutError,
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/unittest/case.py", line 476, in assertRaises
      [2020/06/02 01:00:04.954]     callableObj(*args, **kwargs)
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/collection.py", line 1319, in find_one
      [2020/06/02 01:00:04.954]     for result in cursor.limit(-1):
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/cursor.py", line 1192, in next
      [2020/06/02 01:00:04.954]     if len(self.__data) or self._refresh():
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/cursor.py", line 1109, in _refresh
      [2020/06/02 01:00:04.954]     self.__send_message(q)
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/cursor.py", line 988, in _Cursor__send_message
      [2020/06/02 01:00:04.954]     response = client._run_operation_with_response(
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/mongo_client.py", line 1351, in _run_operation_with_response
      [2020/06/02 01:00:04.954]     return self._retryable_read(
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/mongo_client.py", line 1442, in _retryable_read
      [2020/06/02 01:00:04.954]     if not server.description.retryable_reads_supported:
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/mongo_client.py", line 1290, in _slaveok_for_server
      [2020/06/02 01:00:04.954]     single = topology.description.topology_type == TOPOLOGY_TYPE.Single
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/pymongo/mongo_client.py", line 0, in _get_socket
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/opt/python/jython2.7/Lib/contextlib.py", line 17, in __enter__
      [2020/06/02 01:00:04.954]     return self.gen.next()
      [2020/06/02 01:00:04.954]   File "/data/mci/5662e66da03f3c73c748cf914f9e0d87/src/test/pymongo_mocks.py", line 47, in get_socket
      [2020/06/02 01:00:04.954]     raise AutoReconnect('mock error')
      [2020/06/02 01:00:04.954] AutoReconnect: mock error
      

      https://evergreen.mongodb.com/task/mongo_python_driver_tests_python_version_rhel62_test_ssl__platform~rhel62_auth~noauth_ssl~nossl_python_version~jython2.7_coverage~coverage_test_3.2_standalone_4760d0781505c0f13d5d1bc061ff89075927eb2f_20_06_02_00_45_08

            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: