-
Type: Build Failure
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
-
Python Drivers
-
Not Needed
-
Atlas connect tests are failing due to PYTHON-4731:
[2024/09/17 08:18:07.543] test/atlas/test_connection.py::TestAtlasConnect::test_free_tier [2024/09/17 08:18:07.543] /data/mci/8704c52bf20158fd484ef8090b887121/src/test/atlas/test_connection.py:62: ResourceWarning: Unclosed MongoClient opened at: [2024/09/17 08:18:07.543] File "<frozen runpy>", line 198, in _run_module_as_main [2024/09/17 08:18:07.543] File "<frozen runpy>", line 88, in _run_code [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pytest/__main__.py", line 9, in <module> [2024/09/17 08:18:07.543] raise SystemExit(pytest.console_main()) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/config/__init__.py", line 201, in console_main [2024/09/17 08:18:07.543] code = main() [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/config/__init__.py", line 175, in main [2024/09/17 08:18:07.543] ret: ExitCode | int = config.hook.pytest_cmdline_main(config=config) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ [2024/09/17 08:18:07.543] return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec [2024/09/17 08:18:07.543] return self._inner_hookexec(hook_name, methods, kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall [2024/09/17 08:18:07.543] res = hook_impl.function(*args) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/main.py", line 330, in pytest_cmdline_main [2024/09/17 08:18:07.543] return wrap_session(config, _main) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/main.py", line 283, in wrap_session [2024/09/17 08:18:07.543] session.exitstatus = doit(config, session) or 0 [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/main.py", line 337, in _main [2024/09/17 08:18:07.543] config.hook.pytest_runtestloop(session=session) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ [2024/09/17 08:18:07.543] return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec [2024/09/17 08:18:07.543] return self._inner_hookexec(hook_name, methods, kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall [2024/09/17 08:18:07.543] res = hook_impl.function(*args) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/main.py", line 362, in pytest_runtestloop [2024/09/17 08:18:07.543] item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ [2024/09/17 08:18:07.543] return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec [2024/09/17 08:18:07.543] return self._inner_hookexec(hook_name, methods, kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall [2024/09/17 08:18:07.543] res = hook_impl.function(*args) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 113, in pytest_runtest_protocol [2024/09/17 08:18:07.543] runtestprotocol(item, nextitem=nextitem) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 132, in runtestprotocol [2024/09/17 08:18:07.543] reports.append(call_and_report(item, "call", log)) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 241, in call_and_report [2024/09/17 08:18:07.543] call = CallInfo.from_call( [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 341, in from_call [2024/09/17 08:18:07.543] result: TResult | None = func() [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 242, in <lambda> [2024/09/17 08:18:07.543] lambda: runtest_hook(item=item, **kwds), when=when, reraise=reraise [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_hooks.py", line 513, in __call__ [2024/09/17 08:18:07.543] return self._hookexec(self.name, self._hookimpls.copy(), kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_manager.py", line 120, in _hookexec [2024/09/17 08:18:07.543] return self._inner_hookexec(hook_name, methods, kwargs, firstresult) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/pluggy/_callers.py", line 103, in _multicall [2024/09/17 08:18:07.543] res = hook_impl.function(*args) [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/runner.py", line 174, in pytest_runtest_call [2024/09/17 08:18:07.543] item.runtest() [2024/09/17 08:18:07.543] File "/home/ec2-user/.local/share/hatch/env/virtual/pymongo/0LF4kodG/test/lib/python3.13/site-packages/_pytest/unittest.py", line 351, in runtest [2024/09/17 08:18:07.543] testcase(result=self) [2024/09/17 08:18:07.543] File "/opt/python/3.13/lib/python3.13/unittest/case.py", line 707, in __call__ [2024/09/17 08:18:07.543] return self.run(*args, **kwds) [2024/09/17 08:18:07.543] File "/opt/python/3.13/lib/python3.13/unittest/case.py", line 651, in run [2024/09/17 08:18:07.543] self._callTestMethod(testMethod) [2024/09/17 08:18:07.543] File "/opt/python/3.13/lib/python3.13/unittest/case.py", line 606, in _callTestMethod [2024/09/17 08:18:07.543] if method() is not None: [2024/09/17 08:18:07.543] File "/data/mci/8704c52bf20158fd484ef8090b887121/src/test/atlas/test_connection.py", line 62, in test_free_tier [2024/09/17 08:18:07.543] connect(URIS["ATLAS_FREE"]) [2024/09/17 08:18:07.543] File "/data/mci/8704c52bf20158fd484ef8090b887121/src/test/atlas/test_connection.py", line 52, in connect [2024/09/17 08:18:07.543] client = pymongo.MongoClient(uri) [2024/09/17 08:18:07.543] Call MongoClient.close() to safely shut down your client and free up resources.
- is caused by
-
PYTHON-4731 Explicitly close all MongoClients opened during tests
- Closed