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

Topology not garbage collected during test_encryption.TestDataKeyDoubleEncryption

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

      We see the following in Evergreen logs and also when these tests are run locally:

      Topology <Topology <TopologyDescription id: 5fa1f0698ad53cb215fa7405, topology_type: ReplicaSetWithPrimary, servers: [<ServerDescription ('localhost', 27017) server_type: RSPrimary, rtt: 0.000538420648610058>, <ServerDescription ('localhost', 27018) server_type: RSSecondary, rtt: 0.001056252019849808>, <ServerDescription ('localhost', 27019) server_type: RSArbiter, rtt: 0.0009123198919968762>]>> has THREADS RUNNING: [<PeriodicExecutor(name=pymongo_server_monitor_thread) object at 0x7ff450e41a90>, <PeriodicExecutor(name=pymongo_server_rtt_thread) object at 0x7ff450e41a50>, <PeriodicExecutor(name=pymongo_server_monitor_thread) object at 0x7ff450bfb350>, <PeriodicExecutor(name=pymongo_server_rtt_thread) object at 0x7ff450bfb250>, <PeriodicExecutor(name=pymongo_server_monitor_thread) object at 0x7ff450bfbc10>, <PeriodicExecutor(name=pymongo_server_rtt_thread) object at 0x7ff4524dbbd0>], created at:   File "setup.py", line 431, in <module>
        **extra_opts
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/venv-encryption/lib/python3.7/site-packages/setuptools/__init__.py", line 153, in setup
        return distutils.core.setup(**attrs)
      File "/opt/python/3.7/lib/python3.7/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/opt/python/3.7/lib/python3.7/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/opt/python/3.7/lib/python3.7/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "setup.py", line 130, in run
        result = runner.run(suite)
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/test/__init__.py", line 874, in run
        result = super(PymongoXMLTestRunner, self).run(test)
      File "/opt/python/3.7/lib/python3.7/site-packages/xmlrunner/runner.py", line 66, in run
        test(result)
      File "/opt/python/3.7/lib/python3.7/unittest/suite.py", line 84, in __call__
        return self.run(*args, **kwds)
      File "/opt/python/3.7/lib/python3.7/unittest/suite.py", line 114, in run
        self._handleClassSetUp(test, result)
      File "/opt/python/3.7/lib/python3.7/unittest/suite.py", line 163, in _handleClassSetUp
        setUpClass()
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/test/test_encryption.py", line 630, in setUpClass
        cls.client = rs_or_single_client(event_listeners=[cls.listener])
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/test/utils.py", line 500, in rs_or_single_client
        return _mongo_client(h, p, **kwargs)
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/test/utils.py", line 461, in _mongo_client
        **client_options)
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/pymongo/mongo_client.py", line 727, in __init__
        direct_connection=options.direct_connection)
      File "/data/mci/1d06ce731bf44d878db71873b3380fd4/src/pymongo/settings.py", line 72, in __init__
        self._stack = ''.join(traceback.format_stack())
      

      It is not clear why this occurs since we seem to explicitly close that client in the `tearDownClass` method.

            Assignee:
            prashant.mital Prashant Mital (Inactive)
            Reporter:
            prashant.mital Prashant Mital (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: