No reason to leave these threads running if the agent
is being shut down
Signed-off-by: Adam King <adking@redhat.com>
self.stop = True
if self.mgr_listener.is_alive():
self.mgr_listener.shutdown()
+ if self.ls_gatherer.is_alive():
+ self.ls_gatherer.shutdown()
+ if self.volume_gatherer.is_alive():
+ self.volume_gatherer.shutdown()
def wakeup(self) -> None:
self.event.set()
_is_alive.return_value = True
assert agent.stop == False
assert agent.mgr_listener.stop == False
+ assert agent.ls_gatherer.stop == False
+ assert agent.volume_gatherer.stop == False
agent.shutdown()
assert agent.stop == True
assert agent.mgr_listener.stop == True
+ assert agent.ls_gatherer.stop == True
+ assert agent.volume_gatherer.stop == True
def test_agent_wakeup():