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

CMAP interrupt pending connections test failures

    • Type: Icon: Build Failure Build Failure
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 4.7
    • Affects Version/s: None
    • Component/s: None
    • Not Needed
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Name of Failure: 

      test.test_cmap.TestCMAP.test_cmap_pool_clear_interrupting_pending_connections_clear_with_interruptInUseConnections___true_closes_pending_connections

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_tests_python_version_rhel8_test_ss[…]64c_24_01_19_18_55_10?execution=0&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      Failed after merging PYTHON-3175.

      Stack trace:

      **

       [2024/01/19 11:06:37.160] FAILURE: AssertionError: Didn't ever find 1 <class 'pymongo.monitoring.ConnectionCheckOutFailedEvent'> event(s) ()
       [2024/01/19 11:06:37.160] self = <test.test_cmap.TestCMAP testMethod=test_cmap_pool_clear_interrupting_pending_connections_clear_with_interruptInUseConnections_=_true_closes_pending_connections>
       [2024/01/19 11:06:37.160]     def run_scenario(self):
       [2024/01/19 11:06:37.160] >       self.run_scenario(scenario_def, test)
       [2024/01/19 11:06:37.160] test/test_cmap.py:459:
       [2024/01/19 11:06:37.160] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/01/19 11:06:37.160] test/test_cmap.py:289: in run_scenario
       [2024/01/19 11:06:37.160]     self.run_operations(test["operations"])
       [2024/01/19 11:06:37.160] test/test_cmap.py:170: in run_operations
       [2024/01/19 11:06:37.160]     self.run_operation(op)
       [2024/01/19 11:06:37.160] test/test_cmap.py:164: in run_operation
       [2024/01/19 11:06:37.160]     meth(op)
       [2024/01/19 11:06:37.160] test/test_cmap.py:118: in wait_for_event
       [2024/01/19 11:06:37.160]     wait_until(
       [2024/01/19 11:06:37.160] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/01/19 11:06:37.160] predicate = <function TestCMAP.wait_for_event.<locals>.<lambda> at 0x0000000005d260c0>
       [2024/01/19 11:06:37.160] success_description = "find 1 <class 'pymongo.monitoring.ConnectionCheckOutFailedEvent'> event(s)"
       [2024/01/19 11:06:37.160] timeout = 10.0
       [2024/01/19 11:06:37.160]     def wait_until(predicate, success_description, timeout=10):
       [2024/01/19 11:06:37.160]         """Wait up to 10 seconds (by default) for predicate to be true.
       [2024/01/19 11:06:37.160] 
       [2024/01/19 11:06:37.160]         E.g.:
       [2024/01/19 11:06:37.160] 
       [2024/01/19 11:06:37.160]             wait_until(lambda: client.primary == ('a', 1),
       [2024/01/19 11:06:37.160]                        'connect to the primary')
       [2024/01/19 11:06:37.160] 
       [2024/01/19 11:06:37.160]         If the lambda-expression isn't true after 10 seconds, we raise
       [2024/01/19 11:06:37.160]         AssertionError("Didn't ever connect to the primary").
       [2024/01/19 11:06:37.160] 
       [2024/01/19 11:06:37.160]         Returns the predicate's first true value.
       [2024/01/19 11:06:37.160]         """
       [2024/01/19 11:06:37.160]         start = time.time()
       [2024/01/19 11:06:37.160]         interval = min(float(timeout) / 100, 0.1)
       [2024/01/19 11:06:37.160]         while True:
       [2024/01/19 11:06:37.160]             retval = predicate()
       [2024/01/19 11:06:37.160]             if retval:
       [2024/01/19 11:06:37.160]                 return retval
       [2024/01/19 11:06:37.160] 
       [2024/01/19 11:06:37.160]             if time.time() - start > timeout:
       [2024/01/19 11:06:37.160] >               raise AssertionError("Didn't ever %s" % success_description)
       [2024/01/19 11:06:37.160] E               AssertionError: Didn't ever find 1 <class 'pymongo.monitoring.ConnectionCheckOutFailedEvent'> event(s)
       [2024/01/19 11:06:37.160] test/utils.py:798: AssertionError
       

       

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            noah.stapp@mongodb.com Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: