[Build Failure] test_dns_failures_logging

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 4.14.1
    • Affects Version/s: None
    • Component/s: greenerbuild
    • None
    • None
    • Python Drivers
    • 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?
    • None
    • None
    • None
    • None
    • None
    • None

      Name of Failure:

      test.asynchronous.test_srv_polling.TestSrvPolling.test_dns_failures_logging

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_test_win32_test_standard_v8.0_python3.11_async_noauth_nossl_standalone_patch_9dbccbee2c93582f360f5b822b000d2c06d1c0bd_68a30f2fd7a92a0007b2b77f_25_08_18_11_32_07/tests?execution=0&sorts=STATUS%3AASC

      Context of when and why the failure occurred:

      Seems to be a flaky test on Windows.

      Stack trace:

       [2025/08/18 06:44:41.758] FAILURE: AssertionError: 2 != 1 ()
       [2025/08/18 06:44:41.758] self = <test.asynchronous.test_srv_polling.TestSrvPolling testMethod=test_dns_failures_logging>
       [2025/08/18 06:44:41.758]     async def test_dns_failures_logging(self):
       [2025/08/18 06:44:41.758]         from dns import exception
       [2025/08/18 06:44:41.758]     
       [2025/08/18 06:44:41.758]         with self.assertLogs("pymongo.topology", level="DEBUG") as cm:
       [2025/08/18 06:44:41.758]     
       [2025/08/18 06:44:41.758]             def response_callback(*args):
       [2025/08/18 06:44:41.758]                 raise exception.Timeout("DNS Failure!")
       [2025/08/18 06:44:41.758]     
       [2025/08/18 06:44:41.758]             await self.run_scenario(response_callback, False)
       [2025/08/18 06:44:41.758]     
       [2025/08/18 06:44:41.758]         srv_failure_logs = [r for r in cm.records if "SRV monitor check failed" in r.getMessage()]
       [2025/08/18 06:44:41.758] >       self.assertEqual(len(srv_failure_logs), 1)
       [2025/08/18 06:44:41.758] E       AssertionError: 2 != 1
       [2025/08/18 06:44:41.758] test\asynchronous\test_srv_polling.py:239: AssertionError
      

              Assignee:
              Steve Silvester
              Reporter:
              Steve Silvester
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: