manually release controller and dataplane references
The GC wasn't collecting these objects in a timely manner, which caused the
process to run out of file descriptors.
diff --git a/src/python/oftest/base_tests.py b/src/python/oftest/base_tests.py
index 734e213..7f29db5 100644
--- a/src/python/oftest/base_tests.py
+++ b/src/python/oftest/base_tests.py
@@ -76,6 +76,7 @@
#@todo Review if join should be done on clean_shutdown
if self.clean_shutdown:
self.controller.join()
+ del self.controller
def runTest(self):
# Just a simple sanity check as illustration
@@ -112,6 +113,7 @@
SimpleProtocol.tearDown(self)
if hasattr(self, 'dataplane'):
self.dataplane.kill(join_threads=self.clean_shutdown)
+ del self.dataplane
logging.info("Teardown done")
def runTest(self):
@@ -135,6 +137,7 @@
def tearDown(self):
logging.info("Teardown for simple dataplane test")
self.dataplane.kill(join_threads=self.clean_shutdown)
+ del self.dataplane
logging.info("Teardown done")
def runTest(self):
diff --git a/src/python/oftest/dataplane.py b/src/python/oftest/dataplane.py
index ee3d7b1..a410aaf 100644
--- a/src/python/oftest/dataplane.py
+++ b/src/python/oftest/dataplane.py
@@ -508,6 +508,8 @@
self.logger.debug("Joining " + str(port_number))
self.port_list[port_number].join()
+ self.port_list = None
+
self.logger.info("DataPlane shutdown")
def show(self, prefix=''):