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

TestIndexManagementCreateSearchIndexes failing due to missing type

    • Type: Icon: Build Failure Build Failure
    • Resolution: Duplicate
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Python Drivers
    • 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_index_management.TestIndexManagementCreateSearchIndex.test_name_provided_for_an_index_definition

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_tests_python_version_rhel8_test_ssl__platform~rhel8_auth_ssl~auth_ssl_python_version~3.10_coverage~coverage_test_7.0_sharded_cluster_patch_167b9648caf94d57ee618ed240d7910f4553b55e_66103759c76b7f00076ae13d_24_04_05_17_39_44?execution=0&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      Server is responding with the `type` field included while our tests expect no such field.

      Stack trace:

       [2024/04/05 11:05:59.871] FAILURE: AssertionError: Items in the second set but not the first:
       [2024/04/05 11:05:59.871] 'type' ()
       [2024/04/05 11:05:59.871] self = <test.test_index_management.TestIndexManagementCreateSearchIndex testMethod=test_name_provided_for_an_index_definition>
       [2024/04/05 11:05:59.871]     def test_case(self):
       [2024/04/05 11:05:59.871] >       self.run_scenario(spec)
       [2024/04/05 11:05:59.871] test/unified_format.py:1914: 
       [2024/04/05 11:05:59.871] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
       [2024/04/05 11:05:59.871] test/unified_format.py:1861: in run_scenario
       [2024/04/05 11:05:59.871]     self._run_scenario(spec, uri)
       [2024/04/05 11:05:59.871] test/unified_format.py:1897: in _run_scenario
       [2024/04/05 11:05:59.871]     self.check_events(expect_events)
       [2024/04/05 11:05:59.871] test/unified_format.py:1769: in check_events
       [2024/04/05 11:05:59.871]     self.match_evaluator.match_event(event_type, expected_event, actual_events[idx])
       [2024/04/05 11:05:59.871] test/unified_format.py:870: in match_event
       [2024/04/05 11:05:59.871]     self.match_result(command, actual.command)
       [2024/04/05 11:05:59.871] test/unified_format.py:797: in match_result
       [2024/04/05 11:05:59.871]     return self._match_document(expectation, actual, is_root=not in_recursive_call)
       [2024/04/05 11:05:59.871] test/unified_format.py:786: in _match_document
       [2024/04/05 11:05:59.871]     self.match_result(value, actual[key], in_recursive_call=True)
       [2024/04/05 11:05:59.871] test/unified_format.py:803: in match_result
       [2024/04/05 11:05:59.871]     self._match_document(e, a, is_root=not in_recursive_call)
       [2024/04/05 11:05:59.871] test/unified_format.py:793: in _match_document
       [2024/04/05 11:05:59.871]     self.test.assertEqual(expected_keys, set(actual.keys()))
       [2024/04/05 11:05:59.871] E   AssertionError: Items in the second set but not the first:
       [2024/04/05 11:05:59.871] E   'type'
      
           

       

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

              Created:
              Updated:
              Resolved: