[PATCH] Reduce resource use during traffic_packet test

Andrew Bartlett abartlet at samba.org
Mon May 21 02:32:31 UTC 2018


This matches similar patches done elsewhere in the selftest system and
ensures that the server-side LDAP process disconnects as soon as
possible.

Please review/push!

Andrew Bartlett
-- 
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT   
https://catalyst.net.nz/services/samba



-------------- next part --------------
From 30e33f493a940eb2df4b08080f6a0d42c879da6c Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Mon, 21 May 2018 10:40:00 +1200
Subject: [PATCH] selftest: Clean up ldb on tearDown from each packet in
 TrafficEmulatorPacketTests

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 at samba.org>
---
 python/samba/tests/emulate/traffic_packet.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/python/samba/tests/emulate/traffic_packet.py b/python/samba/tests/emulate/traffic_packet.py
index a2c4567ed1d..56b126759b2 100644
--- a/python/samba/tests/emulate/traffic_packet.py
+++ b/python/samba/tests/emulate/traffic_packet.py
@@ -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):
-- 
2.11.0



More information about the samba-technical mailing list