Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def restartInstance(self, pid, instanceName, enabled):

def checkService(self, serviceName, options):
"""Ping the service, restart if the ping does not respond."""
if serviceName == "Tornado":
if serviceName == "Tornado__Tornado":
return S_OK()
url = self._getURL(serviceName, options)
self.log.info("Pinging service", url)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,12 @@ def test_check_services(self):
self.assertFalse(res["OK"])
self.restartAgent.restartInstance.assert_called_once_with(int(pid), agentName, True)

client = MagicMock()
with patch("DIRAC.FrameworkSystem.Agent.ComponentSupervisionAgent.Client", new=client):
res = self.restartAgent.checkService("Tornado__Tornado", options)
self.assertTrue(res["OK"])
client.assert_not_called()

def test_get_last_access_time(self):
"""Test for the getLastAccessTime function."""
self.agent.os.path.getmtime = MagicMock()
Expand Down
Loading