[Build Failure] TestSearchIndexProse failure

XMLWordPrintableJSON

    • Type: Build Failure
    • Resolution: Fixed
    • Priority: Unknown
    • 4.18.0
    • Affects Version/s: None
    • Component/s: None
    • 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_index_management.TestSearchIndexProse.test_case_3

      Link to task:

      https://spruce.corp.mongodb.com/task/mongo_python_driver_search_index_helpers_rhel8_test_search_index_helpers_a706571502fe55e27b0c1645abe75eb881d859cc_26_05_29_18_40_02/tests?execution=0&sorts=STATUS%3AASC

      Context of when and why the failure occurred:

      Started failing on Mar 31, 2026 in an unrelated spec sync PR.

      Stack trace:

      [2026/05/29 15:14:07.530] FAILURE: TimeoutError: Timed out waiting for index deletion ()
      [2026/05/29 15:14:07.530] self = <test.asynchronous.test_index_management.TestSearchIndexProse testMethod=test_case_3>
      [2026/05/29 15:14:07.530]     async def test_case_3(self):
      [2026/05/29 15:14:07.530]         """Driver can successfully drop search indexes."""
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Create a collection with the "create" command using a randomly generated name (referred to as ``coll0``).
      [2026/05/29 15:14:07.530]         coll0 = self.db[f"col{uuid.uuid4()}"]
      [2026/05/29 15:14:07.530]         await coll0.insert_one({})
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Create a new search index on ``coll0``.
      [2026/05/29 15:14:07.530]         model = {"name": _NAME, "definition": {"mappings": {"dynamic": False}}}
      [2026/05/29 15:14:07.530]         resp = await coll0.create_search_index(model)
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Assert that the command returns the name of the index: ``"test-search-index"``.
      [2026/05/29 15:14:07.530]         self.assertEqual(resp, "test-search-index")
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until the following condition is satisfied:
      [2026/05/29 15:14:07.530]         #   An index with the ``name`` of ``test-search-index`` is present and index has a field ``queryable`` with the value of ``true``.
      [2026/05/29 15:14:07.530]         await self.wait_for_ready(coll0)
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Run a ``dropSearchIndex`` on ``coll0``, using ``test-search-index`` for the name.
      [2026/05/29 15:14:07.530]         await coll0.drop_search_index(_NAME)
      [2026/05/29 15:14:07.530]     
      [2026/05/29 15:14:07.530]         # Run ``coll0.listSearchIndexes()`` repeatedly every 5 seconds until ``listSearchIndexes`` returns an empty array.
      [2026/05/29 15:14:07.530]         t0 = time.time()
      [2026/05/29 15:14:07.530]         while True:
      [2026/05/29 15:14:07.530]             indices = await (await coll0.list_search_indexes()).to_list()
      [2026/05/29 15:14:07.530]             if indices:
      [2026/05/29 15:14:07.530]                 break
      [2026/05/29 15:14:07.530]             if (time.time() - t0) / 60 > 5:
      [2026/05/29 15:14:07.530] >               raise TimeoutError("Timed out waiting for index deletion")
      [2026/05/29 15:14:07.530] E               TimeoutError: Timed out waiting for index deletion
      [2026/05/29 15:14:07.530] test/asynchronous/test_index_management.py:229: TimeoutError
      

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

              Created:
              Updated:
              Resolved: