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

[Build Failure] Async tests missing awaits

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

      Name of Failure:

      FAILED test/asynchronous/test_auth.py::TestGSSAPI::test_gssapi_simple - AttributeError: 'coroutine' object has no attribute 'get'
      [2024/09/10 07:53:21.256] FAILED test/asynchronous/test_auth.py::TestSASLPlain::test_sasl_plain - AttributeError: 'coroutine' object has no attribute 'get'
      [2024/09/10 07:53:21.256] FAILED test/asynchronous/test_bulk.py::AsyncTestBulk::test_large_inserts_unordered - pytest.PytestUnraisableExceptionWarning: Exception ignored in: finalizer of : <coroutine object AsyncDatabase.command at 0x00000000138b7f10>
      [2024/09/10 07:53:21.256] RuntimeWarning: coroutine 'AsyncDatabase.command' was never awaited

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_test_linux_enterprise_auth__platform~rhel8_auth~auth_python_version~pypy3.9_test_enterprise_auth_ead3201a4ebc7e78b46b6fa0e4af25c37b4c7b20_24_09_09_18_35_34/logs?execution=0

      Context of when and why the failure occurred:

      Async test migration

      Stack trace:

      [2024/09/10 07:53:21.256] Coroutine created at (most recent call last)
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/unittest/async_case.py", line 64, in _callTestMethod
      [2024/09/10 07:53:21.256]     self._callMaybeAsync(method)
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/unittest/async_case.py", line 87, in _callMaybeAsync
      [2024/09/10 07:53:21.256]     return self._asyncioTestLoop.run_until_complete(fut)
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/base_events.py", line 634, in run_until_complete
      [2024/09/10 07:53:21.256]     self.run_forever()
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/base_events.py", line 601, in run_forever
      [2024/09/10 07:53:21.256]     self._run_once()
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/base_events.py", line 1897, in _run_once
      [2024/09/10 07:53:21.256]     handle._run()
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/events.py", line 80, in _run
      [2024/09/10 07:53:21.256]     self._context.run(self._callback, *self._args)
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/tasks.py", line 339, in __wakeup
      [2024/09/10 07:53:21.256]     self.__step()
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/asyncio/tasks.py", line 256, in __step
      [2024/09/10 07:53:21.256]     result = coro.send(None)
      [2024/09/10 07:53:21.256]   File "/opt/python/pypy3.9/lib/pypy3.9/unittest/async_case.py", line 101, in _asyncioLoopRunner
      [2024/09/10 07:53:21.256]     ret = await awaitable
      [2024/09/10 07:53:21.256]   File "/data/mci/8d3dac6f29aa6bf2036ae0690368435b/src/test/asynchronous/test_auth.py", line 299, in test_sasl_plain
      [2024/09/10 07:53:21.256]     set_name = await client.admin.command(HelloCompat.LEGACY_CMD).get("setName")
      

            Assignee:
            iris.ho@mongodb.com Iris Ho
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: