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
This commit is contained in:
Neels Hofmeyr 2017-02-24 17:54:22 +01:00
parent 577a125652
commit 44468ad531
1 changed files with 2 additions and 0 deletions

View File

@ -54,6 +54,8 @@ class TestVTYBase(unittest.TestCase):
self.vty = obscvty.VTYInteract(appstring, "127.0.0.1", appport) self.vty = obscvty.VTYInteract(appstring, "127.0.0.1", appport)
def tearDown(self): def tearDown(self):
if self.vty:
self.vty._close_socket()
self.vty = None self.vty = None
osmoutil.end_proc(self.proc) osmoutil.end_proc(self.proc)