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

View File

@ -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)