summaryrefslogtreecommitdiffstats
path: root/openbsc/tests/vty_test_runner.py
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-24 17:54:22 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2017-02-24 17:54:24 +0100
commit40a91b38ec6c9778fed18376e559631c5abe6c1a (patch)
tree1ecf311685636cac80d8b3829d24e6a6363821a8 /openbsc/tests/vty_test_runner.py
parent7a250cc9d9e4bf493d8f92d348fac16976ce6521 (diff)
vty_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: Ie433c8560de54f9a9d05fa07c44bae3126d19b30
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r--openbsc/tests/vty_test_runner.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index f43436082..8b173977c 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -57,6 +57,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)