Commit 7808524a authored by Naoki Kambe's avatar Naoki Kambe
Browse files

[1175] modify test_utils.py

 - explicitly shut down the socket of the msgq before shutting down
   the msgq

 - do nothing in the shutdown method of MockMsgq for avoiding shutting
   down the msgq twice

 - replace the stop method in the shutdown method of the MyStatsHttpd
   with the shutdown command of stats_httpd
parent 5b866ef2
......@@ -99,10 +99,14 @@ class MockMsgq:
except Exception:
pass
finally:
# explicitly shut down the socket of the msgq before
# shutting down the msgq
self.msgq.listen_socket.shutdown(msgq.socket.SHUT_RDWR)
self.msgq.shutdown()
def shutdown(self):
self.msgq.shutdown()
# do nothing for avoiding shutting down the msgq twice
pass
class MockCfgmgr:
def __init__(self):
......@@ -323,7 +327,7 @@ class MyStatsHttpd(stats_httpd.StatsHttpd):
pass
def shutdown(self):
self.stop()
self.command_handler('shutdown', None)
class BaseModules:
def __init__(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment