aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-24 17:54:22 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-25 17:04:45 +0000
commit44468ad531b7baa1c5692d224b2f11695af47970 (patch)
treef9cf2bfa2e0f45665e4042210972a3d548e79728
parent577a1256525a2177f6dee10857b245c09d1e9d82 (diff)
smpp_test_runner.py: fix socket leak
Each running test would open up another socket without ever closing unused ones. Close the sockets after each test is done. Change-Id: I0a42caab3bb8c9c9d04b033e4de9efe0ca8fd2af
-rw-r--r--openbsc/tests/smpp_test_runner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py
index b6da86ca2..4527ac42b 100644
--- a/openbsc/tests/smpp_test_runner.py
+++ b/openbsc/tests/smpp_test_runner.py
@@ -54,6 +54,8 @@ class TestVTYBase(unittest.TestCase):
self.vty = obscvty.VTYInteract(appstring, "127.0.0.1", appport)
def tearDown(self):
+ if self.vty:
+ self.vty._close_socket()
self.vty = None
osmoutil.end_proc(self.proc)