selftest: Clean up ldb on tearDown from each packet in TrafficEmulatorPacketTests
authorAndrew Bartlett <abartlet@samba.org>
Sun, 20 May 2018 22:40:00 +0000 (10:40 +1200)
committerJeremy Allison <jra@samba.org>
Tue, 22 May 2018 22:53:25 +0000 (00:53 +0200)
Otherwise the LDB (and so the server resources) are in use until the end of the whole test
due to the way the objects are maintained in python for reporting.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed May 23 00:53:25 CEST 2018 on sn-devel-144

python/samba/tests/emulate/traffic_packet.py

index a2c4567ed1d246a2815f6381ba9cec4a271c79d9..56b126759b24f8b6c79aa0832202a3b41b4c9efb 100644 (file)
@@ -89,6 +89,7 @@ class TrafficEmulatorPacketTests(samba.tests.TestCase):
     def tearDown(self):
         super(TrafficEmulatorPacketTests, self).tearDown()
         traffic.clean_up_accounts(self.ldb, 1)
+        del self.ldb
         shutil.rmtree(self.tempdir)
 
     def test_packet_cldap_03(self):