diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-24 17:54:22 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2017-02-25 17:04:45 +0000 |
commit | 44468ad531b7baa1c5692d224b2f11695af47970 (patch) | |
tree | f9cf2bfa2e0f45665e4042210972a3d548e79728 /openbsc/tests | |
parent | 577a1256525a2177f6dee10857b245c09d1e9d82 (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
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/smpp_test_runner.py | 2 |
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) |