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

Test failure- test_Unacknowledged_write_using_dollar-prefixed_or_dotted_keys_may_be_silently_rejected_on_pre-5_0_server

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 3.12, 4.0
    • Affects Version/s: None
    • Component/s: Tests
    • Labels:
      None

       [2021/06/22 23:23:53.032] ERROR [0.031s]: test_Unacknowledged_write_using_dollar-prefixed_or_dotted_keys_may_be_silently_rejected_on_pre-5_0_server (test_crud_unified.TestUnifiedReplaceOneDotsAndDollars)
       [2021/06/22 23:23:53.032] ----------------------------------------------------------------------
       [2021/06/22 23:23:53.032] Traceback (most recent call last):
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/test/unified_format.py", line 1114, in test_case
       [2021/06/22 23:23:53.032]     self.run_scenario(spec)
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/test/unified_format.py", line 1098, in run_scenario
       [2021/06/22 23:23:53.032]     self.run_operations(spec['operations'])
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/test/unified_format.py", line 1030, in run_operations
       [2021/06/22 23:23:53.032]     self.run_entity_operation(op)
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/test/unified_format.py", line 914, in run_entity_operation
       [2021/06/22 23:23:53.032]     actual = coerce_result(opname, result)
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/test/unified_format.py", line 619, in coerce_result
       [2021/06/22 23:23:53.032]     'matchedCount': result.matched_count,
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/pymongo/results.py", line 114, in matched_count
       [2021/06/22 23:23:53.032]     self._raise_if_unacknowledged("matched_count")
       [2021/06/22 23:23:53.032]   File "/data/mci/048e1cba14b827a845d0ff7a90a41169/src/pymongo/results.py", line 31, in _raise_if_unacknowledged
       [2021/06/22 23:23:53.032]     raise InvalidOperation("A value for %s is not available when "
       [2021/06/22 23:23:53.032] pymongo.errors.InvalidOperation: A value for matched_count is not available when the write is unacknowledged. Check the acknowledged attribute to avoid this error.
      

      Caused by PYTHON-2556.

      I suspect it's just a bug in the unified test runner. `coerce_result` cannot inspect these fields on unacknowledged writes.

            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: