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:
parent
c6d5421da1
commit
d5834d12f5
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue