Updated Branches: refs/heads/trunk c275b7312 -> 5ca0c22d4
AMBARI-3623. LiveStatus of the component is not updated when username is changed. (Artem Baranchuk via odiachenko) Project: http://git-wip-us.apache.org/repos/asf/incubator-ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-ambari/commit/5ca0c22d Tree: http://git-wip-us.apache.org/repos/asf/incubator-ambari/tree/5ca0c22d Diff: http://git-wip-us.apache.org/repos/asf/incubator-ambari/diff/5ca0c22d Branch: refs/heads/trunk Commit: 5ca0c22d4552920cf43608165e26951bc814d276 Parents: c275b73 Author: Oleksandr Diachenko <[email protected]> Authored: Wed Oct 30 16:04:47 2013 +0200 Committer: Oleksandr Diachenko <[email protected]> Committed: Wed Oct 30 16:04:57 2013 +0200 ---------------------------------------------------------------------- ambari-agent/src/main/python/ambari_agent/StatusCheck.py | 2 +- ambari-agent/src/test/python/TestStatusCheck.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/5ca0c22d/ambari-agent/src/main/python/ambari_agent/StatusCheck.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/main/python/ambari_agent/StatusCheck.py b/ambari-agent/src/main/python/ambari_agent/StatusCheck.py index db2346d..dda127f 100644 --- a/ambari-agent/src/main/python/ambari_agent/StatusCheck.py +++ b/ambari-agent/src/main/python/ambari_agent/StatusCheck.py @@ -67,7 +67,7 @@ class StatusCheck: def __init__(self, serviceToPidDict, pidPathesVars, globalConfig, servicesToLinuxUser): - self.serToPidDict = serviceToPidDict + self.serToPidDict = serviceToPidDict.copy() self.pidPathesVars = pidPathesVars self.pidPathes = [] self.sh = shellRunner() http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/5ca0c22d/ambari-agent/src/test/python/TestStatusCheck.py ---------------------------------------------------------------------- diff --git a/ambari-agent/src/test/python/TestStatusCheck.py b/ambari-agent/src/test/python/TestStatusCheck.py index 5dac1de..e246189 100644 --- a/ambari-agent/src/test/python/TestStatusCheck.py +++ b/ambari-agent/src/test/python/TestStatusCheck.py @@ -87,6 +87,9 @@ class TestStatusCheck(TestCase): statusCheck = StatusCheck(self.serviceToPidDict, self.pidPathesVars, self.globalConfig, self.servicesToLinuxUser) + self.assertTrue(StatusCheck.USER_PATTERN in self.serviceToPidDict[COMPONENT_LIVE]) + self.assertTrue(StatusCheck.USER_PATTERN in self.serviceToPidDict[COMPONENT_DEAD]) + statusCheck.pidFilesDict = self.pidFilesDict get_is_live_mock.side_effect = lambda pid_path : self.is_live_values[pid_path]
