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

Test failure - test_try_next and test_try_next_runs_one_getmore

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.8
    • Affects Version/s: None
    • Component/s: Tests
    • None

      Flakey tests:

       [2019/03/26 11:36:35.986] ERROR [0.213s]: test_try_next (test_change_stream.TestDatabaseChangeStream)
       [2019/03/26 11:36:35.986] ----------------------------------------------------------------------
       [2019/03/26 11:36:35.986] Traceback (most recent call last):
       [2019/03/26 11:36:35.986]   File "/data/mci/5ef7bc7a56f390e4ff67d489d868ece7/src/test/test_change_stream.py", line 81, in test_try_next
       [2019/03/26 11:36:35.986]     self.assertEqual(change['_id'], stream._resume_token)
       [2019/03/26 11:36:35.986] TypeError: 'NoneType' object is not subscriptable
      

      I believe the issue is that ChangeStreams only read majority committed data and we are not waiting long enough for the write to be majority committed. The tests should use majority write concern (and maybe increase max_await_time_ms for good measure).

            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: